00:07:44 | FromGitter | <Varriount> dom96: It may not be possible to statically link to a DLL, however it is possible to load a DLL from memory at runtime. |
00:08:10 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
00:35:11 | * | dhalinar2 joined #nim |
00:43:12 | * | NimBot joined #nim |
00:47:42 | * | wyldcraft joined #nim |
00:48:25 | wyldcraft | i've spent a while trying to figure out what next language to adopt seriously and nim is looking good |
01:01:19 | * | dddddd quit (Remote host closed the connection) |
01:02:38 | FromGitter | <Varriount> We need more library developers. :3 |
01:10:34 | hogeland | just bought nim in action, looking forward to reading it |
01:16:37 | * | ipjk quit (Read error: Connection reset by peer) |
01:20:08 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
01:28:57 | wyldcraft | i'm interested in supporting nim on amazon lambda |
01:29:16 | wyldcraft | one of the 100ms-at-a-time serverless providers |
01:39:45 | * | dhalinar2 quit (Ping timeout: 248 seconds) |
01:54:31 | FromGitter | <Varriount> wyldcraft: I believe @zacharycarter got Nim running on Lambda |
02:01:55 | wyldcraft | seems straightforward with js compile target |
02:02:03 | wyldcraft | hey who wants to make a startup |
02:02:14 | wyldcraft | i just had a "location change" lay-off from my job |
02:02:28 | wyldcraft | i'm full stack linux and android (and ios meh) |
02:02:48 | wyldcraft | with a pile of startup experience |
02:19:09 | * | wyldcraft quit (Ping timeout: 260 seconds) |
02:48:46 | * | martinium joined #nim |
02:51:14 | * | rauss joined #nim |
02:56:38 | * | vlad1777d quit (Ping timeout: 258 seconds) |
03:03:55 | GitDisc | <treeform> making a startup is really hard |
03:09:12 | * | vlad1777d joined #nim |
03:14:09 | * | vlad1777d quit (Ping timeout: 248 seconds) |
03:14:36 | * | vlad1777d joined #nim |
03:29:16 | FromGitter | <Varriount> treeform: You mean a company? |
03:29:25 | * | arecaceae quit (Remote host closed the connection) |
03:29:43 | * | arecaceae joined #nim |
03:30:22 | * | vlad1777d quit (Ping timeout: 258 seconds) |
03:36:54 | * | vlad1777d joined #nim |
03:54:39 | * | vlad1777d quit (Ping timeout: 248 seconds) |
03:57:08 | * | exit70 joined #nim |
04:01:53 | * | vlad1777d joined #nim |
04:08:33 | * | vlad1777d quit (Ping timeout: 248 seconds) |
04:21:29 | * | martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
04:27:19 | * | martinium joined #nim |
04:30:53 | captainkraft | The Nuklear bindings I'm trying to use have {.compile: "src/bind.c".} at the top, but when I try to build, it says the .o file is not found. What could cause this .o file to fail to be generated and should the nim compiler tell me about that? |
04:52:13 | captainkraft | Maybe that compile pragma isn't needed at all? |
04:58:37 | * | martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
04:59:54 | * | vlad1777d joined #nim |
05:11:59 | FromGitter | <Gooseus> So I've been messing around with Nim for the last week or so after seeing it pop up on the radar a few times and it's been a ton of fun. I got my feet wet with a simple cli app and have moved on to attempting a simple async S3 client, where I've run into questions regarding the async dispatch / event loop stuff. |
05:16:16 | FromGitter | <Gooseus> I feel pretty in over my head when it comes to the low-level GC stuff and the higher-level meta-programming template/macro stuff... I'm coming from Javascript land where that is pretty foreign, but async http requests are bread and butter, though we don't have much control over our event loop. |
05:16:37 | FromGitter | <Gooseus> https://gist.github.com/Gooseus/240f534fb6277ef13fcd48a579b9edae |
05:21:05 | FromGitter | <Gooseus> so my question is related to line 33 in that gist: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f01f41210ac269202a127e] |
05:24:12 | FromGitter | <Gooseus> I did some casual a/b testing downloading 100 5mb files from localhost with/without and it seemed like including that initial polling had some improvements, while also seeming to make more sense as an async request mechanism. Am I missing something about how async works here or how it should best be handled at this level? Sorry for the wall of text here |
05:25:10 | * | miran_ joined #nim |
05:28:10 | * | gooseus__ joined #nim |
05:28:52 | * | gooseus__ quit (Client Quit) |
05:41:08 | FromGitter | <Varriount> @Gooseus Just a heads up, the channel gets fairly quiet at this time. |
05:42:20 | FromGitter | <Gooseus> np, I assume there aren't a lot of people on the west coast here? |
05:43:21 | FromGitter | <Varriount> I guess. I'm on the east coast. |
05:43:32 | * | craigger quit (Ping timeout: 260 seconds) |
05:43:32 | FromGitter | <Varriount> We have developers in Europe too |
05:45:04 | * | Vladar joined #nim |
05:45:35 | * | craigger joined #nim |
05:46:01 | FromGitter | <Gooseus> cool cool, I'm patient, I'll just keep messing around and hope for some feedback in the morning |
05:47:15 | FromGitter | <Varriount> @Gooseus Your program is somewhat differently structured. |
05:47:58 | FromGitter | <Varriount> I would normally expect everything, including the logic that adds files, to all be part of the coroutine layout |
05:50:02 | FromGitter | <Varriount> You would have a bunch of coroutines that are launched, passing a filename to each. Those would then download the file and write it out. |
05:50:16 | FromGitter | <Gooseus> @Varriount I'm not familiar with this... any examples laying around? I am kind of just writing like I'm working with a scripting language to see how everything works |
05:51:52 | FromGitter | <Gooseus> how would the coroutines work differently? would that involve some parallelism with additional threads or does that change how the event loop operates? |
05:51:53 | FromGitter | <Varriount> Hrm, no examples off hand, unless I write some pseudocode |
06:02:17 | FromGitter | <Varriount> @Gooseus Something like this: https://gist.github.com/Varriount/e8f0f4fb02d8596b7caa2596c66ffc62 |
06:02:28 | FromGitter | <Varriount> Note that I haven't tested it. |
06:06:35 | FromGitter | <Varriount> Ah, you need to add poll at the logic near the end |
06:06:57 | FromGitter | <Gooseus> ok, I see how that is different, but it mostly differs with how the file output is written, no? |
06:08:53 | FromGitter | <Varriount> The idea is to put the action of writing the file inside the coroutine |
06:10:56 | FromGitter | <Varriount> It's also tricky, calling poll() inside a coroutine. I don't know if the async framework is reentrant. |
06:12:47 | shodan45 | s3 + nim? is there a lib for that? |
06:12:55 | FromGitter | <Gooseus> so is the coroutine a part of the C that is compiled using your pattern? |
06:13:59 | FromGitter | <Gooseus> shodan45 there might be, I'm just playing around... though I have heard a lot of talk about a lack of AWS library |
06:14:24 | FromGitter | <Varriount> Well, it's all compiled to C |
06:14:40 | FromGitter | <Gooseus> ``` Error No package found.`````` |
06:15:07 | FromGitter | <Varriount> Internally, the coroutine is transformed into an iterator, which is then transformed into a regular C function |
06:15:28 | * | miran_ quit (Ping timeout: 248 seconds) |
06:16:46 | FromGitter | <Gooseus> but your code doesn't change the order in which the connections to the server are established? I'm still trying to get your version working |
06:17:27 | FromGitter | <Varriount> Well, with my version, the order will be somewhat unpredictable. |
06:17:56 | FromGitter | <Varriount> Technically it should be same order they were started in. |
06:18:16 | FromGitter | <Varriount> What problem are you encountering? |
06:21:11 | FromGitter | <Varriount> @Gooseus ^ |
06:21:56 | FromGitter | <Gooseus> not really encountering problems, just trying to understand how it's working with regards to the the async/await stuff... I just noticed that when I was trying to grab multiple files asynchronously that the connections would still be made in order because of how I was using await and waitFor |
06:23:06 | FromGitter | <Gooseus> the error in your version is `core_v.nim(37, 13) Error: type mismatch: got (AsyncFile, Future[system.string])` for `await file.write(data)` |
06:23:26 | couven92 | @Varriount, I guess you could even say that *most* people here in the channel are from Europe (and some from the closer parts of Russia), no? At least that is the impression I get from the IP shown in IRC... |
06:26:08 | FromGitter | <Gooseus> hmmm... worked when I changed it to `await file.write(await data)` which I guess makes sense |
06:31:39 | FromGitter | <Varriount> I don't know if 'waitFor' runs the other coroutines too. |
06:31:59 | FromGitter | <Varriount> @dom96 Is there a wait to wait on multiple coroutines at once? |
06:35:42 | * | Arrrr joined #nim |
06:35:42 | * | Arrrr quit (Changing host) |
06:35:42 | * | Arrrr joined #nim |
06:36:10 | * | nsf joined #nim |
06:38:56 | Arrrr | https://github.com/nim-lang/nimforum/pull/111 |
06:39:03 | Arrrr | Nim is the bleeding edge |
06:57:05 | * | shodan45 applies a bandage |
06:57:24 | FromGitter | <mratsim> @captainkraft, {.compile.} path is relative to the caller module not the project root |
07:01:19 | * | jkhl joined #nim |
07:25:26 | * | claudiuinberlin joined #nim |
07:28:48 | * | Viktor joined #nim |
07:45:26 | FromGitter | <Gooseus> @Varriount so my understanding from playing around and poking in the asyncdispatch source is that `waitFor` does `while not fut.finished: poll()` so you'd probably need to construct a future which completes when the every future in a set is finished and then waitFor that one? |
07:45:31 | * | Andris_zbx joined #nim |
07:50:29 | * | PMunch joined #nim |
07:53:35 | * | jkhl quit (Ping timeout: 248 seconds) |
07:57:49 | * | adeohluwa joined #nim |
08:03:13 | * | fredrik92 joined #nim |
08:13:04 | * | couven92 quit (Disconnected by services) |
08:13:15 | * | fredrik92 is now known as couven92 |
08:13:30 | * | fredrik92 joined #nim |
08:25:11 | adeohluwa | say you have a node. js app on a server, all things bn equal you can handle a lot more users by just switching to nim lang right? |
08:26:30 | PMunch | adeohluwa, theoretically yes. But node developers have put a lot of time and effort into improving nodes web performance. So I wouldn't be suprised if they were hard to beat IRL |
08:27:10 | adeohluwa | hmm... okay thanks |
08:28:00 | PMunch | Hmm, parsing the ndi information is proving harder than I had hope.. |
08:28:59 | PMunch | Currently I'm just grabbing the lines it refers to out of the file, but then I'd have to parse the procedure definitions myself. For example if the signature sets a default value and uses type inference to populate that field.. |
08:31:10 | adeohluwa | aii...I'll look for another excuse to use nim + jester |
08:31:38 | PMunch | adeohluwa, it would certainly be interesting if you tried though :) |
08:31:52 | PMunch | If for nothing else then to know were it lies |
08:33:02 | Araq | PMunch, my solution doesn't have anything to do with where the symbols come from |
08:33:07 | PMunch | Apparently someone has already tried: https://github.com/nanoant/WebFrameworkBenchmark |
08:33:26 | PMunch | Araq, which solution? |
08:34:15 | Araq | PMunch, my pragma solution with dynlib, importc |
08:34:42 | PMunch | Yeah, but that was the other way round wasn't it, loading symbols from a dynlib |
08:35:05 | PMunch | What I want is to get a symbol in the dynlib, from the main executable |
08:36:58 | adeohluwa | PMunch: I see nim multiple times there with asyncHttpServer 3 times with different results |
08:38:02 | PMunch | From my example files yesterday: https://pastebin.com/xMUr8Qnc this is the main program. Currently it passes the myProc procedure to the dynlib through the setup call. https://pastebin.com/acK0dAXS this is the dynlib, currently it takes the toCall proc from the setup call. What I want to do is get around the setup proc and have the symbol loaded dynamically for the dynlib code when it is read. |
08:38:19 | PMunch | adeohluwa, yeah.. Could be different versions of Nim? |
08:39:36 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:44:20 | adeohluwa | PMunch: just noticed they were compiled with different flags |
08:45:34 | * | claudiuinberlin joined #nim |
08:47:51 | PMunch | Ah right |
08:50:52 | Araq | PMunch, loading from an .exe is possible but maybe OS specific |
08:51:11 | Araq | it's done with .dynlib, importc anyway, I don't understand your problem |
08:53:15 | PMunch | Error: 'dynlib' requires 'exportc' |
08:53:22 | PMunch | That's with {.dynlib, importc.} |
08:53:41 | PMunch | https://stackoverflow.com/a/17083153 |
08:53:53 | PMunch | That's what I'm trying to do, but in Nim of course |
08:54:42 | PMunch | And it works fine if I do annotate a proc definition with {.importc, extern: "<mangled name>".} in the dynlib |
09:04:31 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:05:57 | PMunch | Hmm, why doesn't nimsuggest give me the signature with outline or "def" on the definition? |
09:06:08 | * | floppydh joined #nim |
09:06:32 | * | craigger quit (Ping timeout: 260 seconds) |
09:07:35 | * | craigger_ joined #nim |
09:08:01 | couven92 | because nimsuggest sometimes is a bit iffy :P try `con` as well to make sure? |
09:08:05 | couven92 | PMunch, ^ |
09:08:24 | couven92 | (i have no idea what con does, but hey sometimes that works for me :P ) |
09:08:33 | PMunch | con does bugger all.. |
09:11:19 | * | voiceftp joined #nim |
09:13:25 | PMunch | This is just getting ridiculous.. |
09:18:59 | * | claudiuinberlin joined #nim |
09:23:16 | Viktor | I wonder how the http performance would be if Nim would open a new thread for each request. |
09:23:48 | couven92 | Viktor, hmm... performance there is very OS-specific |
09:24:21 | couven92 | there are very different ideas of what a thread is depending on what platform you're sitting |
09:24:29 | couven92 | on |
09:25:04 | Viktor | well http servers are probably deployed mostly to unix based environments |
09:25:28 | Viktor | do I understand correctly that if we use AsyncHTTPServer, by default it only uses one core of the machine? |
09:25:45 | couven92 | Viktor, true, but still there might be differences... Also it highly depends WHAT you want to do with your server |
09:26:17 | FromGitter | <data-man> @PMunch Will this help you? https://github.com/transfuturist/plugins |
09:26:28 | couven92 | Something that is very performant for plaintext benchmark responses is not necessarily the best for other use-cases |
09:26:38 | PMunch | For reference, this is how I do it now Araq: https://pastebin.com/NR3xnHU2 https://pastebin.com/SqBRAq9C The output of running main is three "Something cool" and theValue is set to 5 |
09:27:08 | PMunch | data-man, maybe. I'll look at it when I get back |
09:32:47 | adeohluwa | couven92: so the answer is it depends |
09:33:09 | adeohluwa | the answer I want is nim above all |
09:34:14 | Viktor | abeohluwa, do you actually expect to have more than 83 753 requests per second on your server? |
09:35:28 | crem | That's 2 times more than google has! |
09:37:14 | Viktor | so, the benchmark does not matter that much I guess.. :) For me why it matters more that it is type safe, easy to read, uses way less memory than nodejs, and it is just more fun to write. |
09:37:59 | Viktor | *why = what |
09:40:00 | * | JappleAck joined #nim |
09:40:57 | * | vlad1777d quit (Ping timeout: 260 seconds) |
09:41:12 | * | miran quit (Quit: Page closed) |
09:42:26 | FromGitter | <gokr> @Viktor see my blog article on threaded socket server |
09:51:28 | adeohluwa | crem: makes sense so what you are saying is way before performance ever becomes a bottleneck memory will be main issue |
09:52:23 | adeohluwa | Viktor: I'll be switching one nodejs app to nim lang to see how it goes |
09:53:34 | FromGitter | <gokr> There are almost always other bottlenecks, like db, hitting disk, yaddayadda |
09:55:05 | FromGitter | <gokr> One thing very nice with nim is ability to do threads. And also, much less chaos in lang/libs compared to js world |
09:56:24 | FromGitter | <gokr> I just wrote a combined Jester and MQTT daemon that spawns jobs in threads. Very nice. |
10:00:09 | PMunch | Had a look at the lib data-man. Not quite sure how it works/what it dos |
10:00:42 | * | zolk3ri joined #nim |
10:03:59 | Viktor | abeohluwa, I am also working on something similar. I am migrating my pet-project api to Nim. But first I will finish the Nim in Action book to be more confortable with it. |
10:08:16 | * | gokr joined #nim |
10:17:19 | adeohluwa | nice be sure to report the differences between nim vs other ... would be cool to have a peek |
10:35:15 | * | miran joined #nim |
10:41:01 | Viktor | gokr, where can I find your blog about this? |
10:41:31 | * | elrood joined #nim |
10:44:24 | gokr | http://goran.krampe.se/category/nim |
10:45:40 | Viktor | cool, thanks I am going to check it out! |
10:49:51 | gokr | This is also a very nice blog with many nim articles: https://hookrace.net/blog/nim/ |
10:50:09 | Viktor | gokr are you planning on writing a blogpost about the Jester + MQTT app? |
10:50:19 | gokr | yeah |
10:50:24 | gokr | It's open source btw... |
10:50:40 | Viktor | and where is it? |
10:50:44 | gokr | https://github.com/evothings/ecraft2learn/tree/master/arduinobot |
10:51:04 | Viktor | I am at the learning and hamstering info stage with Nim :) So collecting everything I can. |
10:51:29 | Viktor | cheers |
10:52:04 | couven92 | dom96, thanks for the CC on the VS2017 issue, I am working on it |
11:02:47 | * | Snircle joined #nim |
11:05:57 | FromGitter | <mratsim> I'm at a GraphQL Meetup, a new tiny query syntax from Facebook that aims to replace REST, it's quite interesting and I think would be really neat to have in Nim |
11:09:46 | FromGitter | <BigEpsilon> Hi, does any body knows if this bug is already known or if I must fill a new one ? https://play.nim-lang.org/?gist=4f731e9ed021b74eb8909ce700ec6d4f |
11:10:34 | PMunch | Huh, mratsim. GraphQL does look interesting |
11:11:22 | FromGitter | <data-man> @mratsim https://github.com/samdmarshall/GraphQL.nim |
11:11:39 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:12:13 | * | claudiuinberlin joined #nim |
11:12:51 | FromGitter | <mratsim> :) it's a C wrapper though not sure if it works with the JS backend |
11:13:09 | PMunch | Probably wouldn't.. |
11:13:21 | PMunch | But you could always wrap the JS implementation |
11:13:33 | PMunch | Or reimplement in Nim of course :) |
11:15:48 | dom96 | Yeah, GraphQL is awesome. I've used it :) |
11:16:17 | dom96 | Implementing the spec in Nim would be a fun exercise |
11:18:47 | Viktor | I would also add something to the Nim whish list: Thrift |
11:23:15 | * | vlad1777d joined #nim |
11:25:50 | subsetpark | Would you just implement it based on attribute lookup? |
11:32:01 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:39:48 | FromGitter | <gokr> We are just now setting up a "stack" for some future projects - Elixir+Phoenix+Postgres and then Vuejs+Quasar I think on the frontend. Didn't dare go GraphQL just yet though. |
11:43:26 | * | claudiuinberlin joined #nim |
11:49:10 | * | sleepyqt joined #nim |
11:51:46 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:54:21 | * | claudiuinberlin joined #nim |
11:55:18 | floppydh | I have a template FOO that I pass a code-block that calls another template BAR, before it does so, I define a variable in FOO, which I want to use in BAR, but I can't because BAR seems to be "expanded" first before FOO and the variable doesn't exist, at least it seems so - any pointers? |
11:55:49 | floppydh | oh {.inject.} does it |
12:01:40 | FromGitter | <Yardanico> code snippet please ? :) |
12:06:37 | zolk3ri | 'lo nico |
12:07:32 | FromGitter | <Yardanico> yay |
12:07:33 | FromGitter | <Yardanico> https://github.com/nim-lang/Nim/pull/6058#issuecomment-339304243 |
12:08:28 | FromGitter | <Yardanico> we'll get a fast (parallel) and nice testament |
12:10:07 | zolk3ri | that is a long line indeed |
12:10:15 | zolk3ri | and long func name |
12:10:17 | zolk3ri | xD |
12:10:49 | zolk3ri | make it "TestResultFactoryGeneratorPanelPartialLikeTotes" |
12:10:54 | PMunch | He comes from C# where all names are long |
12:12:13 | PMunch | zolk3ri, have you seen this: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition |
12:12:29 | zolk3ri | oh yeah oh my god |
12:12:43 | zolk3ri | gradle, even.. |
12:13:06 | GitDisc | <GooRoo> have a question regarding length of code lines: is the limitation to 80 characters still reasonable? |
12:13:11 | PMunch | https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/blob/master/src/main/java/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/impl/StandardFizzBuzz.java |
12:13:18 | zolk3ri | PMunch: lmaop |
12:13:54 | PMunch | GooRoo, yeah it has it's uses. GitHub diffs look horrible for example, if you don't limit yourself to 80 characters. |
12:14:24 | FromGitter | <Yardanico> @GooRoo: yes |
12:14:42 | FromGitter | <Yardanico> com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.factories.FizzBuzzSolutionStrategyFactory |
12:14:53 | zolk3ri | yeah, and long lines usually implies your code needs refactoring |
12:14:58 | zolk3ri | imply |
12:15:32 | GitDisc | <GooRoo> not "usually". It really depends IMO |
12:15:45 | GitDisc | <GooRoo> also it depends on what to consider as "long line" |
12:16:00 | zolk3ri | >80 chars |
12:16:27 | GitDisc | <GooRoo> this limitation is a bit artificial nowadays, isn't it |
12:16:41 | GitDisc | <GooRoo> in the past you just couldn't see more on your screen |
12:17:12 | zolk3ri | it's still annoying if you have several windows open side by side |
12:17:20 | PMunch | Well, it could just as well be 90 characters. But 80 characters have been a standard for so long so tools (like GitHub) might do strange things if you break it |
12:17:48 | FromGitter | <Yardanico> also horizontal scrolling is annoying if you didn't know :) |
12:18:00 | zolk3ri | yeah |
12:18:49 | PMunch | There is a guy on YouTube who has a nice talk about this |
12:19:06 | zolk3ri | GooRoo: https://stackoverflow.com/a/578318 |
12:19:07 | PMunch | Amongst other things why 80 characters are a good thing to stick to |
12:19:44 | FromGitter | <Yardanico> zolk3ri: that's from 2009 |
12:19:46 | FromGitter | <Yardanico> a bit old :) |
12:19:56 | GitDisc | <GooRoo> It all sounds like a legacy problems. Tools are bad because of legacy limitations. Horizontal scrolling is bad because historically we got vertical one on our mouses, but then monitors became wide-screen |
12:20:14 | FromGitter | <BigEpsilon> If some one have an idea https://forum.nim-lang.org/t/3281 |
12:20:14 | FromGitter | <Yardanico> @GooRoo: but what if you need to have two editors open side-by-side? |
12:20:20 | FromGitter | <Yardanico> you'll still need horizontal scrolling |
12:20:24 | zolk3ri | Yardanico: And the 80 column limit is even older :) |
12:20:31 | PMunch | Kevlin Hnney is the guy |
12:20:38 | PMunch | Talks a lot about these kinds of things |
12:21:35 | GitDisc | <GooRoo> I wonder how many people have 21:9 screens |
12:21:52 | zolk3ri | Yardanico: and the points still apply, even today :P |
12:23:49 | FromGitter | <Yardanico> as most say today, it's better to have 80 chars soft-limit |
12:23:55 | FromGitter | <Yardanico> and ~100-120 - hard limit |
12:24:13 | * | dddddd joined #nim |
12:24:31 | GitDisc | <GooRoo> I usually prefer exactly 120 |
12:24:50 | GitDisc | <GooRoo> but have 80 limit at work because of Gerrit |
12:24:58 | GitDisc | <GooRoo> it looks like a shit |
12:25:47 | FromGitter | <Yardanico> well 120 everywhere is a bit too high :) |
12:26:22 | zolk3ri | I doubt you would need long lines if you didn't use obnoxiously long names. |
12:26:59 | floppydh | thats just crazy :) https://github.com/nim-lang/Nim/blob/49c6dbf4ab3e60a0e850ac876e54c0c6bc07de89/lib/pure/future.nim#L125 |
12:27:34 | zolk3ri | GooRoo: What do you mean by "exactly"? If there's not 120 characters on the line you add some till it is? :P |
12:27:55 | floppydh | creating a type and instantiating it in a module as a global just to get the syntax you want :) |
12:28:09 | FromGitter | <Yardanico> floppydh: have another way? |
12:28:24 | floppydh | Yardanico no, I just think it's incredibly dirty |
12:28:44 | floppydh | Yardanico, don't think it's possible in another way |
12:28:46 | FromGitter | <Yardanico> well yes, because nim doesn't have built-in list comprehensions |
12:28:55 | FromGitter | <Yardanico> so it will probably be *dirty* |
12:29:02 | floppydh | Yardanico, you can't nest those lcs either no? |
12:29:03 | GitDisc | <GooRoo> @zolk3ri, sure I add some spacing inbetween |
12:29:29 | FromGitter | <Yardanico> floppydh: you can try |
12:29:36 | FromGitter | <Yardanico> but I don't really think you should use them |
12:29:41 | FromGitter | <Yardanico> they're rarely useful |
12:29:52 | floppydh | This particular implementation or list-comprehensions in general? |
12:30:08 | FromGitter | <Yardanico> list comprehensions in nim |
12:30:13 | FromGitter | <Yardanico> hopefully we'll get "for" as an expression |
12:30:14 | floppydh | I benched them they perform fine, just the syntax is awful and limited |
12:30:28 | FromGitter | <Yardanico> well because they're not built-in, as I said :P |
12:30:40 | FromGitter | <Yardanico> a lot of features are not built-in in nim to keep core language small |
12:30:45 | FromGitter | <Yardanico> e.g. async/await |
12:30:53 | floppydh | well you can blame limited expression ability in Nim as well tho |
12:30:57 | FromGitter | <Yardanico> it's implemented with macros and iterators |
12:31:14 | floppydh | like just because it aint a language features doesn't mean it has to be this bad to use |
12:31:45 | FromGitter | <Yardanico> "However, this is no real restriction because Nim's syntax is flexible enough anyway." :) |
12:32:04 | floppydh | well, mb you could do the lc-implementation better |
12:32:14 | FromGitter | <Yardanico> the thing is: you can't pass INVALID nim syntax to the macro |
12:32:20 | floppydh | I'm aware |
12:32:27 | dom96 | gokr: Why Elixir? |
12:33:11 | floppydh | don't think current lc implementation does type-deduction either, that might be possible to do with macros |
12:33:26 | FromGitter | <Yardanico> it would be hard to do |
12:33:28 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
12:33:37 | floppydh | hard sure, but possible |
12:33:50 | floppydh | I don't think hard to do is a reason to push things into the language instead of into a lib |
12:33:54 | floppydh | no? |
12:34:02 | FromGitter | <Yardanico> no |
12:34:17 | FromGitter | <Yardanico> nim core language tries to not have 100500 features |
12:35:03 | floppydh | right, but I'm kinda with you that I also hope list-comprehensions or something along those lines become really comfortably to use |
12:35:19 | FromGitter | <Yardanico> it would be really hard to support all those features in the compiler |
12:35:33 | FromGitter | <Yardanico> floppydh: as I said, "for" loop will be an expression |
12:35:38 | FromGitter | <Yardanico> so you'll be able to do something like |
12:36:02 | FromGitter | <Yardanico> let a = for item in items: for data in item: data |
12:36:18 | floppydh | Yardanico looks good |
12:36:21 | FromGitter | <Yardanico> but maybe not in one line |
12:36:58 | subsetpark | I have found that `lc[]` is not necessary in 90% of situations that `mapIt` suffices perfectly |
12:37:01 | floppydh | thats not feature-complete to lcs no? - let a = [ x*x for x in xs ] |
12:37:24 | FromGitter | <Yardanico> let a = for x in xs: x * x |
12:38:25 | dom96 | in fact, implementing 'for' as an expression would be a fun exercise in compiler hacking :) |
12:38:50 | floppydh | Yardanico guess that's fine |
12:39:10 | dom96 | But there surely are other things that the list comprehension syntax allows which for loop as an expression won't |
12:39:22 | floppydh | :( |
12:39:49 | FromGitter | <Yardanico> well I saw this a lot of times already: people want nim to have all features possible in another languages |
12:40:03 | FromGitter | <Yardanico> and they complain if they don't find some feature :P (not about list comps, just in general) |
12:40:30 | floppydh | Yardanico: well, lcs are really an intrisic part of python and there's potential for python people to look to Nim? |
12:40:47 | floppydh | but sure, that's just PLs in general no? - people try to appyl what they learnt to something new |
12:40:48 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:40:53 | FromGitter | <Yardanico> yes, but Nim is not Python |
12:41:06 | FromGitter | <Yardanico> nim doesn't try to clone python fully |
12:41:18 | floppydh | Yardanico, sure I get that, I just see no reasons why lcs shouldnt be in Nim ? They seem to fit really well |
12:41:25 | FromGitter | <Yardanico> well they are in nim |
12:41:32 | FromGitter | <Yardanico> in future module :) |
12:41:43 | floppydh | Yardanico: I thought we both agreed that one wouldn't really suggest using them |
12:42:14 | FromGitter | <Yardanico> but they *are* usable, I just say that they're not the best since you need to write types yourself |
12:42:47 | floppydh | I don't mind not having lcs, but then something comparable that covers thigns like filtering and nested iteration and assigns them to a value in a one-liner :P |
12:43:04 | floppydh | well that, and they can't be nested AFAIS |
12:43:05 | FromGitter | <Yardanico> did you ever look at templates in sequtils module? |
12:43:14 | floppydh | I did not |
12:43:28 | FromGitter | <Yardanico> there's filterIt, mapIt, etc.. templates |
12:43:36 | floppydh | Yardanico: ah thanks I'll look into them |
12:43:45 | FromGitter | <Yardanico> e.g. @[1, 2, 3, 4, 5].filterIt(it > 3).mapIt(it * 5) |
12:44:01 | FromGitter | <Yardanico> !eval import sequtils; echo @[1, 2, 3, 4, 5].filterIt(it > 3).mapIt(it * 5) |
12:44:03 | NimBot | @[20, 25] |
12:44:13 | floppydh | mhhh, let me bench those |
12:44:16 | floppydh | "bench" |
12:45:03 | FromGitter | <Yardanico> benchmarking things like this isn't the best idea IMO, because if you need to write fast code you wouldn't write list comps anyway |
12:45:14 | floppydh | Yardanico: how so? |
12:45:42 | floppydh | Yardanico: I mean I guess you can still write generator expressions |
12:46:27 | FromGitter | <Yardanico> btw, use "nimbench" for benchmarking |
12:46:28 | floppydh | don't filter/map/reduce produce a lot of temporaries? |
12:46:37 | floppydh | if you chain them |
12:46:52 | FromGitter | <Yardanico> it does, because nim has value semantics (copying) |
12:47:08 | FromGitter | <Yardanico> well there are inplace templates too |
12:47:09 | FromGitter | <Yardanico> in sequtils |
12:47:20 | FromGitter | <Yardanico> e.g. applyIt |
12:47:20 | floppydh | yeah I generally dislike those for that reason, they're used like that in new JS/ES6 too, but those temporaries also can't be optimized away in these |
12:47:45 | floppydh | there wont be temporaries in an lc AFAIK in python |
12:47:59 | FromGitter | <Yardanico> so did you benchmark these templates? |
12:48:06 | floppydh | Yardanico on it |
12:48:10 | FromGitter | <Yardanico> yes, because list comprehensions are a core feature of python, as I said |
12:48:49 | FromGitter | <Yardanico> I can ask you too, for example - why you can't write simple templates/macros in python (without additional modules) ? |
12:49:37 | * | gokr quit (Ping timeout: 248 seconds) |
12:50:33 | floppydh | Yardanico: because python code wants to be free of runtime/compiletime separations? idk |
12:52:27 | FromGitter | <Yardanico> and anyway, I don't think it's actually good to compare python and nim, since python is interpreted, and nim is compiled :) |
12:54:12 | floppydh | Yardanico, well I mean, I don't even think its that much of a python thing, python just does lcs really well, they just make what they do more concise and more explicit then a bunch of nested loops and the like I feel and they don't produce unnecessary temporaries |
12:56:14 | floppydh | just like I think "in" ought to be in every PL? it seems to just fit everywhere |
12:56:37 | FromGitter | <Yardanico> "in"? |
12:57:08 | floppydh | Yardanico: in-keyword |
12:58:15 | zolk3ri | ocaml has it |
12:59:14 | floppydh | zolk3ri: doesn't it mean something else then how its used in pyton or nim? |
13:00:59 | * | claudiuinberlin joined #nim |
13:04:34 | zolk3ri | floppydh: In OCaml it's just either "let foo = expr in expr" or "let foo = expr;;", ;; ends the block of code, whereas in only denotes the end of the let binding. |
13:05:04 | floppydh | zolk3ri: right it has a different meaning |
13:12:00 | FromGitter | <mratsim> @floppydh @yardanico check out the logs from last week but Araq or dom96 said that after for becomes an expression they will have a look into list comprehension and |
13:12:36 | floppydh | mratsim oh neat, thanks for the info |
13:13:08 | FromGitter | <Yardanico> @mratsim I said about that |
13:13:24 | FromGitter | <Yardanico> I know that araq was talking about this |
13:13:54 | dom96 | I'd be interested to know what limitations you guys can come up with for 'for expressions' |
13:14:19 | dom96 | I think list comprehensions hold a bit more features than for expressions would |
13:14:26 | dom96 | but maybe I should just stop asking and look into it myself |
13:14:42 | FromGitter | <mratsim> @BigEpsilon for your issue, will reply in 5 hours when I'm back home but to interface with Cuda C++ in Arraymancer I had to use C++ types defined in templates. Basically <'0> for return value type or <'1> for first arg, etc and <'*0> in case the return value is a pointer T. |
13:15:33 | FromGitter | <BigEpsilon> @mratsim , thanks :) |
13:16:07 | FromGitter | <BigEpsilon> but actualy my problem is that I want to access to the value of the generic parameter, not its type |
13:16:46 | FromGitter | <BigEpsilon> ie, i want to generate Vec<double, 3> for example |
13:16:57 | FromGitter | <BigEpsilon> not Vec<double, int> |
13:17:14 | FromGitter | <BigEpsilon> and there is nothing in the doc for that |
13:17:25 | FromGitter | <mratsim> Mmmm I see, you want to access static[int] |
13:17:30 | FromGitter | <BigEpsilon> yes |
13:17:35 | FromGitter | <BigEpsilon> exactly |
13:17:47 | * | craigger_ quit (Ping timeout: 246 seconds) |
13:18:33 | FromGitter | <BigEpsilon> There are alot of such types in opencv |
13:18:43 | FromGitter | <BigEpsilon> like compile time matrices |
13:18:50 | FromGitter | <mratsim> Feature request I guess or put that in a cpp file and try to use c2nim on it, who knows |
13:19:21 | FromGitter | <BigEpsilon> I worked alot on c2nim already |
13:19:55 | FromGitter | <mratsim> You probably will encounter this at one point by the way: https://github.com/nim-lang/Nim/issues/6415 |
13:20:10 | * | craigger joined #nim |
13:20:49 | FromGitter | <BigEpsilon> did not have this bug until now |
13:20:59 | FromGitter | <BigEpsilon> but yes I'll maybe inconter it |
13:21:17 | FromGitter | <BigEpsilon> I started to doubt if it is worth it |
13:21:25 | FromGitter | <BigEpsilon> fighting all this bugs |
13:21:49 | FromGitter | <BigEpsilon> because there is always another one hiding in the corner |
13:22:11 | FromGitter | <BigEpsilon> If you have time it is not a big deal |
13:22:13 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:22:13 | FromGitter | <mratsim> Or maybe I just didn't understand how to map C++ Generics with Nim generics. It works fine for functions but not for structs/objects |
13:23:05 | FromGitter | <BigEpsilon> I'll show you how I did it then for some types |
13:24:47 | FromGitter | <BigEpsilon> https://gist.github.com/BigEpsilon/3a07021a66175d50d0adf7d918fdeb21 |
13:25:12 | FromGitter | <BigEpsilon> ah yes one with generics |
13:26:16 | FromGitter | <mratsim> Docs say my way should work but the same syntax for procs is possible if fine-grained control is needed: https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-objects |
13:28:38 | FromGitter | <BigEpsilon> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f09186d6c36fca31956918] |
13:31:52 | FromGitter | <BigEpsilon> this works and I can call it with: ⏎ ⏎ ```var r : Rect_u[float] ⏎ echo r.x ⏎ echo r.y``` [https://gitter.im/nim-lang/Nim?at=59f092480182fa5f4d775113] |
14:01:37 | FromGitter | <mratsim> Building Street Fighter AI that reads frames and uses the joystick: ://medium.com/gyroscopesoftware/how-we-built-an-ai-to-play-street-fighter-ii-can-you-beat-it-9542ba43f02b hopefully I'll bring Arraymancer there soon (TM) |
14:01:40 | FromGitter | <mratsim> https |
14:06:51 | * | nsf quit (Quit: WeeChat 1.9) |
14:11:58 | Viktor | mratsim, is this related to Nim? |
14:12:59 | PMunch | Viktor, Arraymancer is written in Nim |
14:13:10 | Viktor | ah ok |
14:17:30 | dom96 | Build a Euro Truck Simulator 2 bot instead |
14:17:37 | dom96 | You can say that has a practical reason to exist :) |
14:18:24 | FromGitter | <mratsim> @Viktor I'm building a multidimensional array and deep learning library in Nim |
14:18:25 | captainkraft | mratsim: The problem wasn't the path to the C file, it was that it wasn't spitting out a .o file into the nimcache folder. |
14:18:28 | PMunch | There was a guy who built an AI to drive around in GTA |
14:18:35 | PMunch | Based on reading the screen |
14:18:38 | captainkraft | mratsim: that was re: .compile pragma |
14:18:59 | Viktor | mratsim, awesome! |
14:21:14 | FromGitter | <mratsim> Mmm I had this issue but few months ago @captainkraft, the c file had to be in nimcache. But last time I tried (like 2 weeks ago) it was done properly without needing to move the file to nimcache iirc |
14:21:40 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:22:15 | captainkraft | I have the nuklear.nim file with .compile pragma and bind.c in same directory. When I import nuklear.nim, presumably bind.c should be compiled and bind.o should be put into nimcache? |
14:22:24 | FromGitter | <mratsim> @Pmunch if you search "OpenAI Gym" you will find Python libraries and exercises to train an AI on various games, Pacman, super Mario and others iirc |
14:22:48 | FromGitter | <mratsim> By reading the screen and simulating joysticks input |
14:23:15 | PMunch | mratsim, neat! |
14:23:43 | PMunch | Such a silly problem, with such a complex solution :P |
14:23:58 | FromGitter | <mratsim> @captainkraft yes |
14:24:14 | captainkraft | If I manually compile bind.c and move the bind.o into nimcache, it seems to work fine. I'm just not sure why bind.o doesn't exist when importing nuklear.nim |
14:24:47 | Araq | captainkraft, me neither, I used .compile for directories, didn't fail me |
14:24:54 | FromGitter | <mratsim> Try the compile example in the manual to check if it works |
14:25:46 | captainkraft | I'm on my laptop now, and it works... Maybe I just did something dumb on my other computer. |
14:27:53 | FromGitter | <mratsim> Clear your nimcache and retry to make sure :p |
14:33:12 | * | claudiuinberlin joined #nim |
14:33:48 | * | claudiuinberlin quit (Client Quit) |
14:37:40 | captainkraft | Tested on both computers after clearing nimcache. It works... |
14:38:00 | captainkraft | Nothing to see here |
14:40:53 | Viktor | nimcache is platform specific, right? Meaning that it will be different on Mac than on Linux |
14:40:53 | FromGitter | <dandevelo> Is there any simple function to remove a prefix from a string? |
14:46:04 | PMunch | dandevelo set length or variable? |
14:46:27 | PMunch | Viktor, yes I'm pretty sure it would differ |
14:46:58 | PMunch | Think about if you had a "when defined(osx)" in your code. It would be compiled away on linux and the nimcache would not have it |
14:47:11 | FromGitter | <dandevelo> @PMunch variable |
14:48:01 | FromGitter | <Yardanico> @dandevelo yes |
14:48:17 | FromGitter | <Yardanico> firstly - you can just make a slice |
14:48:23 | FromGitter | <Yardanico> e.g. mystring = mystring[4..^1] |
14:48:41 | FromGitter | <dandevelo> Suppose I receive a string in the file://C:/doc.txt and I want to strip the file:// prefix |
14:48:42 | Araq | yay, made the tester run in parallel |
14:48:49 | FromGitter | <Yardanico> really? |
14:49:02 | FromGitter | <Yardanico> does it still output html result? |
14:49:03 | Araq | yep, now my machine is crawling |
14:49:16 | FromGitter | <Yardanico> @dandevelo you can copy-paste this proc until it's merged :) https://github.com/nim-lang/Nim/pull/6473 |
14:49:29 | Araq | 100% CPU :-) |
14:49:33 | FromGitter | <Yardanico> lol, nice |
14:49:42 | FromGitter | <Yardanico> Araq: will you push it or there are some specific problems? |
14:50:17 | Araq | will push into a branch I guess |
14:50:45 | FromGitter | <dandevelo> @Yardanico thanks! |
14:51:51 | * | ShalokShalom joined #nim |
14:52:37 | Araq | hmm never saw the machine this laggy |
14:53:06 | Araq | I need to keep 'allslow' as an option |
14:54:59 | FromGitter | <Yardanico> but yeah, now we will forget about timeouts on CI servers for a year (or less) :D |
14:58:26 | * | claudiuinberlin joined #nim |
14:59:59 | * | couven92 quit (Ping timeout: 258 seconds) |
15:03:26 | dom96 | Araq: What speed up are you getting? |
15:05:00 | * | nathanj joined #nim |
15:05:19 | FromGitter | <mratsim> @dom96 there is a 404 when accessing page 2 of this thread: https://forum.nim-lang.org/t/3276 |
15:05:42 | dom96 | fixed |
15:06:22 | FromGitter | <mratsim> 10 sec to fix? Impressive! |
15:06:46 | FromGitter | <mratsim> Ah it was a new user |
15:07:11 | * | PMunch quit (Quit: Leaving) |
15:08:35 | FromGitter | <Yardanico> as usual |
15:10:57 | * | Jesin quit (Quit: Leaving) |
15:13:14 | * | Jesin joined #nim |
15:13:51 | Araq | dom96, not sure, 15 minutes? |
15:14:04 | dom96 | you should measure :) |
15:16:47 | * | joshbaptiste_ quit (Quit: WeeChat 1.6) |
15:16:48 | Araq | yay just made a bug because json has a 'contains' proc |
15:16:57 | * | joshbaptiste joined #nim |
15:17:11 | Araq | when every type implements every function you lost all type safety |
15:17:35 | dom96 | which contains? |
15:17:43 | * | gokr joined #nim |
15:17:53 | Araq | json |
15:17:59 | dom96 | what's the signature? |
15:18:07 | Araq | let state = elem["result"].str |
15:18:07 | Araq | if state.contains("reSuccess"): inc result.successCount |
15:18:14 | Araq | I forgot the '.str' |
15:18:23 | FromGitter | <Yardanico> ah, you use json? |
15:18:24 | FromGitter | <Yardanico> neat |
15:18:45 | dom96 | Still not answering my question... |
15:18:48 | dom96 | presumably this one https://nim-lang.org/docs/json.html#contains,JsonNode,string |
15:18:56 | Araq | https://nim-lang.org/docs/json.html#contains,JsonNode,string |
15:19:41 | FromGitter | <Yardanico> hmm, google closure compiler seems to be very neat |
15:19:48 | FromGitter | <Yardanico> e.g. it can inline functions |
15:20:57 | gokr | Hmmm, my messages got lost I think, I will repeat: |
15:21:04 | dom96 | Araq: yeah, that's a silly one |
15:21:12 | gokr | dom96: Hehe, "why Elixir?" - why not? ;) |
15:21:20 | dom96 | gokr: why not Nim? :P |
15:21:22 | gokr | When it comes to maturity, stability, scalability, robustness as a web backend - I would say Elixir is a very strong contender. |
15:21:29 | gokr | No matter how much I like Nim, I can't see it really competing. |
15:21:36 | zolk3ri | C |
15:21:36 | dom96 | Why? :) |
15:21:44 | dom96 | i.e. how can we improve? |
15:21:57 | gokr | Well, I presume you know a fair bit about Elixir/Phoenix, right? |
15:22:41 | dom96 | I wouldn't say that. IIRC it runs on the Erlang VM? |
15:22:48 | gokr | Yeah. |
15:23:02 | gokr | So Elixir is the new lang running on the Erlang platform. |
15:23:13 | gokr | Phoenix is the web framework. |
15:23:34 | floppydh | well if nim would run on Erlang VM ... |
15:23:35 | gokr | http://phoenixframework.org |
15:23:54 | gokr | https://elixir-lang.org |
15:24:47 | gokr | floppydh: A bit of a misfit i think, Erlang is a bit special, but well, who knows |
15:25:13 | gokr | But if we were to make a list of what Nim needs to compete - it would be .... a long list. |
15:25:16 | floppydh | gokr: yeah was more like a joke :3 |
15:25:47 | dom96 | gokr: Can you give some major things at least? |
15:25:55 | gokr | I gotta run, but yeah - if Nim really wants to be "the best" in that arena - then IMHO Elixir and Phoenix is the stuff to beat. |
15:26:15 | Araq | yeah we don't want to be "the best" in that arena |
15:26:17 | floppydh | You can hotwswap code, altough almost noone seems to use it |
15:26:22 | gokr | Ok, so the Erlang VM scales almost linearly on multicore architectures. |
15:26:43 | dom96 | Okay, so performance is one. |
15:26:45 | gokr | It uses "green" Processes on top of threads I think. Scales insanely. |
15:27:00 | gokr | I mean SCALES. |
15:27:16 | gokr | Then you have the whole OTP platform. |
15:27:38 | Araq | yeah web scale, whatever. |
15:27:40 | gokr | That's Ericsson's crazy robust platform for making 100% available systems etc etc. |
15:27:44 | floppydh | Araq: :D |
15:27:49 | dom96 | Araq: Shush |
15:27:56 | gokr | Don't make fun of it - it's very good shit. |
15:28:05 | gokr | Just read up on what Whatsapp was built with. |
15:28:14 | Araq | I did read that months ago |
15:28:14 | floppydh | also discord |
15:28:19 | gokr | How they scaled to 400 million users on 60 servers or what it was. |
15:28:26 | floppydh | https://blog.discordapp.com/scaling-elixir-f9b8e1e7c29b |
15:28:49 | gokr | There are also fun articles on how they scaled Phoenix on a single machine to 2 million concurrent connections IIRC. |
15:28:51 | dom96 | Well that sure is discouraging D: |
15:29:16 | gokr | What? |
15:29:30 | floppydh | their actor model apparently is really good and the VM just has been taken care of for quite a long time now no |
15:29:49 | gokr | Yes, very highly tuned. Extremely good latency numbers. |
15:30:21 | floppydh | if you read the above discord article you'll see where they started to have issues with it tho and where they started to write own libs to fix it |
15:30:31 | floppydh | but they still conclude that it was "worth it" |
15:30:34 | gokr | I gotta go, back later |
15:31:08 | gokr | But the whole OTP stuff - Erlang etc - was built to run Ericsson telephone switches - with 0 downtime. |
15:31:43 | gokr | It's designed for extreme robustness. Isolated processes can die etc, without taking anything else down. |
15:33:53 | dom96 | Araq: So what do we want to be "the best" in? |
15:34:53 | Araq | floppydh, your remark is spot on ;-) |
15:35:04 | floppydh | being enjoyable is good enough to me and Nim is that already atm |
15:35:28 | Araq | "Sessions would block on these requests until they timed out while receiving messages from other services, causing them to balloon their message queues and eventually OOM the whole Erlang VM resulting in cascading service outages." yay isolated processes |
15:35:59 | * | gokr quit (Ping timeout: 248 seconds) |
15:39:11 | Araq | dom96, we don't want to be "the best", we want to be really, really good at CPU bound and IO bound stuff |
15:39:20 | floppydh | I mean with all new things it's really hyped and I'm sure as everything problems will show when you really work with it, but because it's rather hard to get into theres a lot of hype when most stay on the outside not being able to pass that entry barrier |
15:39:52 | Araq | dom96, but read the article, there is nothing that wouldn't be possible with Nim as it is now, ymmv |
15:40:10 | Araq | "oh we only had to fix this and that and the stdlib and replace modules with C" |
15:41:30 | Araq | not to mention that most async implementations still beat pico-micro-threads |
15:42:27 | * | floppydh quit (Quit: WeeChat 1.9.1) |
15:42:44 | dom96 | But I want us to be the best :( |
15:42:59 | Araq | or that this way of writing software doesn't work for many applications like compilers |
15:44:52 | FromGitter | <Yardanico> dom96: find a large company to support nim |
15:44:56 | FromGitter | <Yardanico> and then we'll be the best :P |
15:46:23 | FromGitter | <Gooseus> should build a large company (read sustainable) to support yourselves... I had a question about async http stuff and the event loop like 10 hours ago in here, I'll brb to restate if that's way too far to scroll |
15:47:37 | dom96 | Gooseus: no need to restate: https://irclogs.nim-lang.org/25-10-2017.html#05:11:59 |
15:48:11 | FromGitter | <Gooseus> beautiful... alright, on a call, would love any feedback/insight! |
15:48:15 | FromGitter | <Yardanico> @Gooseus if you want to have blocked IO (e.g. you're polling stuff), you shouldn't use async at all |
15:48:23 | FromGitter | <Yardanico> *e.g. if you want to wait for a request |
15:48:30 | FromGitter | <Yardanico> well you can still use async |
15:48:34 | FromGitter | <Yardanico> but use things like waitFor |
15:49:16 | FromGitter | <Yardanico> and your example wouldn't compile anyway, since you need to call async procs from async procs |
15:49:25 | FromGitter | <Yardanico> or from any procs using waitFor / asyncCheck |
15:51:05 | * | ShalokShalom quit (Remote host closed the connection) |
15:51:27 | FromGitter | <Yardanico> so what's your use case? |
15:57:35 | FromGitter | <Varriount> @Gooseus I'm awake again. :D |
15:58:00 | dom96 | I'm also a bit confused about what you actually want |
15:58:56 | dom96 | keep in mind that ``waitFor`` calls ``poll`` |
15:59:07 | dom96 | the requests won't make progress until ``poll`` is called |
15:59:09 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:59:24 | dom96 | I don't understand the advantage that performing this early polling brings though |
15:59:27 | * | claudiuinberlin joined #nim |
15:59:57 | * | claudiuinberlin quit (Client Quit) |
16:00:56 | FromGitter | <Varriount> @dom96 You might look at the modifications I made |
16:01:07 | GitDisc | <treeform> yeah the async http stuff still confuses me, stuck with this odd error {.locks: <unknown>.} message... |
16:01:11 | dom96 | link? |
16:01:27 | FromGitter | <Yardanico> treeform: add gcsafe pragma to your proc |
16:01:29 | dom96 | treeform: yeah, that's a result of GC safety :( |
16:01:32 | FromGitter | <Yardanico> can probably help it :) |
16:01:42 | dom96 | That error needs to be improved |
16:02:01 | FromGitter | <Varriount> @dom96 https://irclogs.nim-lang.org/25-10-2017.html#06:02:17 |
16:02:41 | dom96 | hrm, I can't find a bug to improve this error |
16:02:53 | dom96 | treeform: could you submit a bug report for this? presumably you have a nice small test case |
16:03:08 | federico3 | all that hype around erlang was from 10 years ago. It had very little traction and it's not used at large scale because it's not solving the real problems. |
16:03:35 | GitDisc | <treeform> Not really I am trying to use this non-documented websocket library, and I though it was just written badly |
16:03:47 | * | claudiuinberlin joined #nim |
16:03:48 | GitDisc | <treeform> gcsafe worked though |
16:03:52 | dom96 | niv's? |
16:03:52 | GitDisc | <treeform> works great now |
16:03:55 | GitDisc | <treeform> yes |
16:04:05 | dom96 | I use it in my snake game in case you want some examples |
16:04:15 | dom96 | although to be honest the API of that library needs improvement |
16:04:15 | FromGitter | <mratsim> @Araq CPU-bound is overrated, I would prefer if Nim was really really strong at memory-bound stuff. Things mentioned here: https://crd.lbl.gov/departments/computer-science/PAR/research/roofline/ |
16:05:37 | GitDisc | <treeform> dom96 I don't like that it uses exceptions for control flow |
16:07:05 | GitDisc | <treeform> ws.getFD().AsyncFD.int marks things with {.locks: <unknown>.} |
16:07:27 | GitDisc | <treeform> if i remove that I no longer get locks unkown |
16:07:34 | * | PMunch joined #nim |
16:07:52 | dom96 | weird |
16:08:06 | dom96 | please report this somewhere :) |
16:08:17 | GitDisc | <treeform> i'll am making a smaller example |
16:09:35 | GitDisc | <treeform> oh that is not it, nothing makes sense ... |
16:10:03 | * | miran_ joined #nim |
16:10:24 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
16:14:50 | GitDisc | <treeform> dom96, https://gist.github.com/treeform/af788a3cc79e876e1271f446c343186c here is the smallest sample I could make, can you teach me how to report this correctly? |
16:15:51 | dom96 | Sure: https://github.com/nim-lang/Nim/issues/new |
16:16:12 | dom96 | Call it... hrm |
16:16:25 | dom96 | "No info about gcsafety in error message" |
16:16:26 | GitDisc | <treeform> it might be this issue: https://github.com/nim-lang/Nim/issues/6186 |
16:16:46 | dom96 | oh, you're right |
16:16:57 | GitDisc | <treeform> seems like same as well: https://github.com/nim-lang/Nim/issues/5415 |
16:17:09 | dom96 | Add your snippet in there anyway and say you're affected :) |
16:17:17 | * | Viktor quit (Quit: Viktor) |
16:18:35 | GitDisc | <treeform> Does your niv/websocket.nim project compile? Did you just add gcsafe? |
16:19:14 | dom96 | I haven't compiled it in a while but here is the code https://github.com/dom96/snake/blob/master/snake/server.nim |
16:21:51 | * | Andris_zbx quit (Remote host closed the connection) |
16:22:36 | * | JappleAck quit (Quit: Leaving) |
16:23:34 | GitDisc | <treeform> Yeah your snake server gets the same error as I do |
16:23:47 | * | Trustable joined #nim |
16:23:54 | GitDisc | <treeform> https://gist.github.com/treeform/6d48ab0d675c341ab2c0084eafdc08df |
16:24:03 | dom96 | D: |
16:24:06 | dom96 | Recent change I guess |
16:24:38 | GitDisc | <treeform> does gcsafe mask the problem? or fix it? |
16:24:47 | GitDisc | <treeform> I am still accessing a global var without locks? |
16:25:24 | dom96 | if you are accessing a global var then you should probably make it a {.threadvar.} |
16:25:52 | GitDisc | <treeform> I think I will just change the niv websockets lib to not use global vars |
16:26:18 | GitDisc | <treeform> it uses it for ping and pong, which could just be done in that async/greenlet what ever that thing is called. |
16:26:37 | dom96 | oh, yeah, it definitely shouldn't need to use global vars |
16:27:19 | GitDisc | <treeform> but I will need touse global vars just make them with {.threadvar.}? |
16:27:24 | dom96 | I created an issue with some things that should be changed in case you want to take care of them as well https://github.com/niv/websocket.nim/issues/1 |
16:27:27 | GitDisc | <treeform> but I will need touse global vars just mark them with {.threadvar.}? |
16:28:08 | dom96 | yeah, that would be ideal I think |
16:28:22 | dom96 | That way the library should work when using multiple threads |
16:29:00 | GitDisc | <treeform> I still don't get how threads and async stuff interact, but I guess I will figure it out. |
16:29:03 | dom96 | (or at least have a chance to, you'd still need to initialise that global var for each thread (which IMO should be done automatically by Nim... but that's another issue :))) |
16:29:04 | GitDisc | <treeform> Got to go, thanks! |
16:32:41 | dom96 | Huh, I just looked up the latest techempower benchmarks and Jester is ahead of Crystal https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=json&l=82vf1y |
16:34:00 | dom96 | oh, but they do no parallelisation |
16:46:09 | FromGitter | <Gooseus> ok, back kind of @Varriount @dom96 @Yardanico - so one thing I was thinking about was that it seems like you just control the event loop by calls to poll... so you'd have more control over the async flow by changing when the app defers to the event loop processing |
16:46:27 | * | gokr joined #nim |
16:47:13 | miran_ | i'm browsing through issues to see if there is something i could solve... |
16:47:26 | miran_ | this one looks like it can be closed? https://github.com/nim-lang/Nim/issues/6135 (cc dom96) |
16:47:46 | * | arecaceae quit (Remote host closed the connection) |
16:47:56 | FromGitter | <Gooseus> so I forked off of @Varriount example and added back the`while not c_prog: poll()` - https://gist.github.com/Gooseus/0ac36280d7e0420360d781058093f882 and the main difference I understand it is that my version opens the remote connection for each file before moving on to setting up the next connection |
16:48:04 | * | arecaceae joined #nim |
16:49:21 | dom96 | miran_: seems like it |
16:49:25 | FromGitter | <Varriount> I doubt think you should be calling poll inside a coroutine. Again, I don't know if the async internals are reentrant |
16:49:59 | FromGitter | <Gooseus> really that progress flag is a hack because HttpClientBase doesn't make the `connected` public, or else I was thinking you'd be able to do `while not client.connected: poll()` wherever you wanted to waitFor the connection before moving on... not that I have specific use cases for this, but I imagine someone smart would |
16:50:08 | dom96 | async internals aren't reentrant |
16:50:12 | miran_ | dom96: 1 down, 1100 to go :) |
16:50:27 | FromGitter | <Gooseus> reentrant? |
16:50:30 | dom96 | Technically nothing bad should happen if you call 'poll' within an async proc, but I would advise against it anyway |
16:50:42 | dom96 | https://en.wikipedia.org/wiki/Reentrancy_(computing) |
16:50:50 | dom96 | Wikipedia can explain it better than I can :) |
16:51:14 | FromGitter | <Gooseus> ya, I gotcha |
16:52:28 | FromGitter | <Yardanico> @Gooseus in this version you just store all futures and then wait for every one of them to complete |
16:52:41 | FromGitter | <Yardanico> so you don't need poll here |
16:52:47 | FromGitter | <Yardanico> it's actually rarely needed |
16:53:18 | dom96 | Anybody want to help me write https://submission.fosdem.org/stands.php ? :) cc federico3 |
16:55:56 | FromGitter | <Gooseus> right, you don't need it to just get from A to B, but I'm talking about the stuff in between... one thing I noticed was that while both versions had comparable times to finish that my version seemed to finish the earlier files first, which I assume is because file 1 is connected and partially downloading while each poll is running to connect the following files |
16:56:53 | FromGitter | <Yardanico> @Gooseus actually your first version is not async |
16:57:12 | FromGitter | <Gooseus> the first version I posted last night? |
16:57:16 | FromGitter | <Yardanico> yes |
16:57:28 | FromGitter | <Yardanico> because your poll() with while loop is blocking until request is done |
16:57:39 | FromGitter | <Yardanico> so basically there's no difference between sync and async in your version |
16:57:41 | gokr | federico3: I would argue that your statement about erlang is false. |
16:58:33 | gokr | See for example: http://highscalability.com/blog/2014/2/26/the-whatsapp-architecture-facebook-bought-for-19-billion.html |
16:58:45 | FromGitter | <Yardanico> @Gooseus well *technically* it still uses async selectors & stuff, but you get no benefits from async here |
16:58:56 | FromGitter | <Gooseus> @Yardanico well my latest version has the same thing and it should only poll until the first progress callback is called |
16:59:36 | gokr | dom96: Regarding competing with Elixir/Erlang/Phoenix - http://phoenixframework.org/blog/the-road-to-2-million-websocket-connections |
17:00:22 | dom96 | gokr: fun :) |
17:00:37 | dom96 | I'll be trying similar benchmarks |
17:00:45 | dom96 | So thanks for the link |
17:00:55 | gokr | dom96: Further, Nim will never beat everyone at everything. Araq may make fun of Erlang/Elixir or whatever, but IMHO, that's not rooted in reality. |
17:01:01 | federico3 | gokr: if you have evidence of erlang being widely used across very large services... |
17:01:13 | gokr | dom96: Note that they had to use a LOT of servers just to create that load. |
17:01:42 | dom96 | Okay, maybe I'll be a bit less ambitious |
17:01:43 | federico3 | and by all means, popularity is not a metric of quality. |
17:01:45 | gokr | federico3: What do you mean? Isn't Pinterest, Whatsapp, Facebook messenger (or whatever it was), Klarna etc etc enough? |
17:01:51 | federico3 | no |
17:02:09 | gokr | I have no idea what you mean. |
17:02:27 | dom96 | hrm https://elixirforum.com/t/why-did-facebook-leave-erlang/2231 |
17:02:52 | FromGitter | <Yardanico> https://www.quora.com/When-did-Facebook-switch-away-from-using-Erlang-for-Facebook-Chat-What-was-the-reason-for-it-What-did-they-replace-it-with |
17:03:07 | FromGitter | <Yardanico> "one server in the group would fail and cause cascading issues" same as with discord |
17:03:19 | SunDwarf | is quora really a reliable source |
17:03:31 | dom96 | An FB employee is somewhat reliable |
17:03:39 | FromGitter | <mratsim> For technical questions you often get good answers |
17:03:49 | federico3 | gokr: despite the hype, the use of C, C++, Java, even Go for *really* large service far outweights Erlang. |
17:03:51 | SunDwarf | oh its from an fb employee |
17:03:51 | FromGitter | <mratsim> for “opinions” well ... |
17:03:57 | FromGitter | <Gooseus> @Yardanico I definitely think I'm missing something with nim async stuff... cause runForever and waitFor all just run poll on different conditions. Is there some other pattern you need to use in order to make it truly async or something? |
17:03:59 | SunDwarf | i didnt even open the article because quora is 99% trash |
17:03:59 | federico3 | but we should discuss is #nim-offtopic |
17:04:36 | FromGitter | <mratsim> I think scaling web services is pretty on topic. It’s not my domain but I find it interesting. |
17:04:36 | dom96 | gokr: So my question is now, something which you might not be able to answer, but what are you doing that it requires the supposedly low-latency/high-throughput characteristics of Elixir? |
17:04:58 | FromGitter | <Yardanico> @Gooseus you don't need to use blocking wait for async futures, because this would destroy the whole point of async |
17:04:59 | FromGitter | <mratsim> chat server for a very popular game? ;) |
17:05:32 | FromGitter | <Yardanico> @Gooseus usually you have some main proc, and use waitFor mymainproc() |
17:05:36 | FromGitter | <Yardanico> and mymainproc is async |
17:05:43 | FromGitter | <Yardanico> and it's using "await" and "yield" |
17:05:46 | FromGitter | <Yardanico> or asyncCheck sometimes |
17:05:50 | FromGitter | <mratsim> or a Gitter/Discord/IRC/Twitch bridge in Nim :P |
17:06:34 | federico3 | mratsim: more brid |
17:06:58 | federico3 | (oops) more bridges between Matrix and other protocols would be really welcome |
17:07:35 | PMunch | Carrier pidgeon -> IRC bridge? |
17:07:58 | FromGitter | <Gooseus> @Yardanico right but calling mymainproc stops at whatever internal await/yield/asyncCheck until you pass the mymainproc return to a waitFor, right? |
17:07:58 | SunDwarf | you could easy do that by just running irc over tcp/ac |
17:08:16 | PMunch | SunDwarf, haha good point :P |
17:08:40 | PMunch | But I think a dedicated bridge would reduce the overhead |
17:08:48 | FromGitter | <Yardanico> @Gooseus I didn't quite undestood you, sorry |
17:09:32 | FromGitter | <Yardanico> it wouldn't stop it's executing at "yield" or "asyncCheck", it only would stop it's execution at "await", which literally means async wait (wait for some async proc to complete) |
17:10:00 | FromGitter | <Yardanico> and even if you have await in mymainproc, other async coroutines will still work (if you've called them via yield or asyncCheck) |
17:12:04 | dom96 | PMunch: Now I know the topic for my next live stream :P |
17:12:09 | dom96 | Can't wait to get pooped on |
17:12:16 | PMunch | Haha :P |
17:12:26 | PMunch | That would be the best |
17:14:57 | FromGitter | <mratsim> by the way, is there any reason to use one way or the other when all the other part of the code will use the “ref object”? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Nim manual/tutorial uses the first version everywhere (?) but I don’t see the advantage when you never call NodeObj [https://gitter.im/nim-lang/Nim?at=59f0c691f7299e8f532fbdff] |
17:15:54 | FromGitter | <Gooseus> ok... so with regards to the asynchttpclient when you call the internal get methods (getContent), that is an async function and you get a future back that you would call waitFor on, but until you call waitFor the get method is stopped before it opens the remote connection and once you do, then main execution is stopped until that future completes after getting a full response back |
17:15:56 | * | ofelas joined #nim |
17:15:59 | gokr | dom96: The answer is basically that no, we don't really "need" the ultra low latency or scalability BUT we do want a good robust framework and runtime that a customer can accept as "ok, this is scalable stuff - we will not outgrow it". |
17:16:16 | dom96 | gokr: fair enough |
17:16:29 | gokr | dom96: Also, I have fiddled with Phoenix and its really nice well thought out. Tons of RoR people are moving to Elixir/Phoenix. |
17:16:40 | FromGitter | <Yardanico> @Gooseus usually you would call "await" on it |
17:16:47 | FromGitter | <Yardanico> you almost never need waitFor in async procs |
17:16:54 | FromGitter | <Yardanico> because "await" is better than waitFor |
17:17:19 | FromGitter | <Yardanico> (for usage inside of async procs) |
17:17:26 | FromGitter | <Gooseus> if you never use waitFor, then when would the event loop ever execute? |
17:17:29 | FromGitter | <Yardanico> because it wouldn't block other coroutines |
17:17:33 | dom96 | gokr: It does look well made and mature so I don't blame you at all. |
17:17:35 | FromGitter | <Yardanico> @Gooseus you use waitFor ONCE |
17:17:38 | gokr | dom96: One alternative is nodejs - but... it truly is a messy world. Not at all as "solid". And we still want expressiveness and relatively high productivity - so no, we aren't gonna use Go or something. |
17:17:39 | FromGitter | <Yardanico> to call your main proc |
17:17:43 | dom96 | Just curious how we can improve. |
17:17:52 | FromGitter | <Yardanico> and everywhere else you use await/yield/asyncCheck |
17:18:23 | dom96 | Sadly I don't think it will be me that creates the super awesome Nim web framework that everyone falls in love with. |
17:18:36 | gokr | dom96: I am with ya |
17:18:41 | dom96 | I can't develop Nim's stdlib/nimble/etc and do that. |
17:18:45 | FromGitter | <Gooseus> so you basically queue up all your async routines and then start the machine once with waitFor and it susses out how everything is going to shake out? |
17:18:55 | dom96 | So as much as I would love to I don't it's a good idea for me to start |
17:19:10 | gokr | dom96: I know. One thing I haven't really grokked is... why doesn't someone write a tight integration with Nginx? |
17:19:12 | FromGitter | <Yardanico> @Gooseus you don't queue them up |
17:19:18 | FromGitter | <Yardanico> everything is executed in order how you wrote it |
17:19:30 | gokr | dom96: Since a Nim+Nginx feels like a solid really fast single-box solution. |
17:19:31 | dom96 | gokr: What do you mean by 'tight'? |
17:19:32 | FromGitter | <Yardanico> did you read docs here? https://nim-lang.org/docs/asyncdispatch.html |
17:19:37 | FromGitter | <Yardanico> at the start |
17:19:42 | gokr | dom96: Well, some kind of nginx module. |
17:19:45 | FromGitter | <Yardanico> it seems you should read them :) |
17:20:10 | dom96 | gokr: I'd be curious to see how much of a performance boost that would give vs. the pain of dealing with that :) |
17:20:42 | FromGitter | <Yardanico> it would give us a VERY high performance boost, if done right |
17:20:49 | FromGitter | <Yardanico> nginx is extremely performant |
17:20:56 | FromGitter | <Gooseus> @Yardanico I have been reading through that page and the asyncdispatch.nim source trying to understand how it all works |
17:21:14 | gokr | dom96: Well, I can see that if Nim could show that "hey, look at this, 5x faster than nodejs" or whatever. And rock solid. |
17:21:30 | dom96 | That is my plan currently |
17:21:32 | * | nsf joined #nim |
17:21:43 | dom96 | Build a simple site for Jester with docs and some benchmarks |
17:22:00 | FromGitter | <Yardanico> @Araq, it seems we should edit our travis config according to https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received :) |
17:22:02 | dom96 | somebody on HN mentioned that it would go a long way |
17:22:13 | FromGitter | <Gooseus> I think a diagram would probably help... because when I see doing multiple async operations at once and then waiting for both to finish in order to execute on those results it seems like the mechanism is to create a sequence of futures (like in the example) and then wait for each one in the sequence in order, right? |
17:22:15 | dom96 | Yardanico: I don't think travis ever times out |
17:22:27 | FromGitter | <Yardanico> it does, if there's no output |
17:22:29 | FromGitter | <Yardanico> default is 10 mins |
17:22:34 | FromGitter | <Yardanico> new tester wouldn't echo any output |
17:22:38 | FromGitter | <Yardanico> because it runs in parallel |
17:22:49 | dom96 | Gooseus: A bit lame of me to suggest this, but my book explains async with some nice diagrams |
17:22:55 | FromGitter | <Yardanico> (well it probably would do it in old "slow" mode, but not in the new one) |
17:23:10 | FromGitter | <Gooseus> I have the book and am pretty much on that chapter |
17:23:23 | dom96 | awesome :) |
17:23:31 | FromGitter | <Gooseus> pretty good so far btw, nicely done @dom96 ! |
17:23:35 | dom96 | thanks! |
17:23:47 | FromGitter | <mratsim> (No one on this ?) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f0c8a332e080696e24a890] |
17:23:56 | FromGitter | <Yardanico> @mratsim post a question on the forum :) |
17:24:12 | FromGitter | <Yardanico> and it seems appveyor failed because of some real runtime error :) |
17:24:22 | dom96 | mratsim: what's the problem? |
17:24:32 | gokr | dom96: gotta go, but I am all with ya ;) |
17:24:38 | dom96 | Yardanico: what ever happened to your Gitter bridge? |
17:24:51 | dom96 | gokr: Great :) See you |
17:25:01 | FromGitter | <Yardanico> dom96: what do you mean? |
17:25:16 | FromGitter | <mratsim> not a problem, in the manual and tutorial, I see the first form, but it you only refer to the “Node” ref object, wouldn’t it be simpler to just use the second one. |
17:25:25 | dom96 | Yardanico: well there was an issue with httpclient which required a patch, did you create a PR? |
17:26:08 | dom96 | mratsim: yep, feel free to change it. Believe it or not, it wasn't always possible to write 'ref object' :) |
17:26:24 | FromGitter | <mratsim> oh, mystery solved =) |
17:27:52 | FromGitter | <Yardanico> dom96: well I didn't make a PR yet, sorry. ⏎ also, about https://github.com/nim-lang/Nim/pull/6585 - the reason I asked is because it's just a wrapper, and wrappers mostly don't follow nim code style (even in this epoll wrapper constants are declared LIKE_THIS, but not LikeThis or likeThis). |
17:28:25 | FromGitter | <Gooseus> so the use case I'm thinking about is still the downloading a set of files from a remote server, performing some transformation on them and passing them to another remote location.... so if you imagine that the files are different sizes then the download would finish for each of them at different times. ⏎ Based on the example where you create a sequence of futures that you waitFor, if the future early in the sequence |
17:28:25 | FromGitter | ... was large it would block the processing of the smaller files later in the sequence, right? |
17:28:43 | FromGitter | <Yardanico> @Gooseus you can have callbacks |
17:28:47 | dom96 | Yardanico: yeah, that's fair, it just looked in particular weird to me so I changed it |
17:28:55 | FromGitter | <Varriount> @dom96 I would love it if we could get speeds comparable to Go's frameworks. |
17:28:56 | FromGitter | <Yardanico> well, I'm fine with it, just was curious |
17:30:23 | SunDwarf | go is probably fast because it removes everything good |
17:30:41 | GitDisc | <GooRoo> like exceptions? |
17:31:05 | SunDwarf | aside from the gobashing, what made everyone standardize on 2-space indentation in nim |
17:32:19 | dom96 | Araq came down from Heaven with a stone tablet, it read "Ye shall indent with 2 spaces" |
17:32:30 | dom96 | :) |
17:32:39 | SunDwarf | im gonna be a rebel and use 3 |
17:32:48 | FromGitter | <Yardanico> ohhh |
17:32:53 | FromGitter | <Gooseus> @Yardanico ok, so you'd have to use callbacks in that example... there isn't some other clever pattern? I mean, I'm used to callbacks for days, but was trying to do things different |
17:32:56 | dom96 | I'm gonna write my own editor that allows me to use 3.14 spaces |
17:33:05 | dom96 | Ultimate hipster |
17:33:16 | FromGitter | <Yardanico> why not 1/999801 spaces? |
17:33:50 | SunDwarf | does it use the new character encoding, utf-IEEE754 |
17:33:51 | FromGitter | <Yardanico> (it's ~ 0.000_001_002_003_004_005_006_007) |
17:34:09 | FromGitter | <Yardanico> yes, WTF-IS-UTF encoding |
17:34:14 | * | claudiuinberlin joined #nim |
17:34:18 | GitDisc | <GooRoo> @dom96 using text for a code is too old-school-ish |
17:34:27 | FromGitter | <Yardanico> oh well... https://simonsapin.github.io/wtf-8/ |
17:34:42 | GitDisc | <GooRoo> time to switch to AST-editing and stop discussions about number of spaces in indentation |
17:34:51 | SunDwarf | what is gitdisc |
17:35:07 | FromGitter | <Yardanico> bridge between discord and irc |
17:35:13 | SunDwarf | wow what |
17:35:17 | SunDwarf | where's the discord |
17:35:18 | dom96 | GooRoo: It's all about VR these days https://media2.giphy.com/media/xebOoxouppcGs/giphy.gif :) |
17:35:19 | FromGitter | <Gooseus> where is the slack bridge? |
17:35:24 | SunDwarf | its my preferred chat platform |
17:35:44 | FromGitter | <Yardanico> https://discordapp.com/invite/ezDFDw2 |
17:35:58 | GitDisc | <laura ☭> neat |
17:36:11 | dom96 | Yardanico: Can you add Discord to our website? |
17:36:21 | GitDisc | <laura ☭> i feel like you totally could've used a webhook for the irc bot |
17:36:30 | dom96 | Annoying thing about Slack is that there needs to be a special website for allowing people to join it... |
17:36:32 | GitDisc | <laura ☭> so that it changes name |
17:36:50 | FromGitter | <Yardanico> I didn't write my own Discord-IRC, I'm too lazy :P |
17:38:32 | FromGitter | <zacharycarter> lol that's a sweet VR simulation dom96 |
17:38:43 | GitDisc | <laura ☭> oh god the default notifcation setting |
17:38:59 | dom96 | zacharycarter: can you tell what movie it's from? :) |
17:39:01 | FromGitter | <Yardanico> laura: how do I change the default notification setting? |
17:39:05 | FromGitter | <Yardanico> IDK how to do it in discord really |
17:39:10 | FromGitter | <zacharycarter> I cannot |
17:39:34 | dom96 | A clue: https://media0.giphy.com/media/Q2W4hziDOyzu0/giphy.gif |
17:39:34 | GitDisc | <laura ☭> Server Settings -> scroll down -> Only @mentions |
17:39:43 | FromGitter | <zacharycarter> hahaha hackers |
17:39:45 | FromGitter | <Gooseus> so I'm curious... is anyone actively working on an AWS SDK? I see this project, but it's a little barebones - https://github.com/aidansteele/aws_sdk.nim |
17:39:49 | GitDisc | <Yardanico> done |
17:40:07 | GitDisc | <laura ☭> tgabks |
17:40:10 | GitDisc | <laura ☭> thanks |
17:40:18 | GitDisc | <laura ☭> oh nice it triggers twice on edits |
17:40:37 | dom96 | zacharycarter: best movie |
17:40:53 | FromGitter | <zacharycarter> dom96: hahaha it is pretty fantastic |
17:40:55 | dom96 | yeah, that's actually something that FromGitter doesn't do |
17:41:19 | FromGitter | <Yardanico> (well this discord-irc bot is actually written in Go and has many backends, but tshhhhhh) |
17:41:20 | FromGitter | <Gooseus> Always Be Hacking Gibsons |
17:41:21 | FromGitter | <zacharycarter> @Gooseus : I'd chat with @Varriount - he's done some work on one |
17:41:22 | * | xet7 quit (Ping timeout: 258 seconds) |
17:41:33 | dom96 | You gotta hack the Gibson! |
17:42:13 | dom96 | Btw it's interesting to me how many people depend on the aws sdk |
17:42:22 | dom96 | I've seen people that judge a language based on the availability of that package |
17:42:36 | dom96 | I personally stay as far away as I can from AWS :P |
17:43:34 | FromGitter | <zacharycarter> Mostly enterprise affiliated folks |
17:43:44 | FromGitter | <zacharycarter> or people that love giving amazon their $ |
17:43:55 | FromGitter | <zacharycarter> how else are you going to ☁️ |
17:44:03 | FromGitter | <Gooseus> S3 is pretty awesome |
17:44:23 | FromGitter | <Yardanico> @zacharycarter free stuff from azure bizspark for sure |
17:44:33 | * | miran_ quit (Ping timeout: 248 seconds) |
17:44:33 | FromGitter | <Yardanico> (if you have a start-up :P) |
17:44:51 | dom96 | Digital Ocean ftw |
17:44:52 | FromGitter | <Gooseus> I mean, they've got lots of awesome services... def a little evil empire, but they sure know how to create solutions man |
17:45:04 | FromGitter | <gokr> @dom96 kinda like openresty |
17:45:45 | GitDisc | <laura ☭> I prefer scaleway myself |
17:45:53 | GitDisc | <laura ☭> dirt cheap and pretty good specs |
17:46:22 | FromGitter | <Gooseus> but yeah, since universities aren't pumping out sys-admins enough sys-admins to make them good/cheap, most companies need AWS or similar |
17:46:29 | dom96 | The reason I like to stay away from AWS is because from the times I've used it I could never be sure that they wouldn't charge me money |
17:46:36 | FromGitter | <Gooseus> so you need an AWS SDK if you want to get those companies to use nim at work |
17:46:43 | dom96 | (when I was cancelling things for example) |
17:47:29 | FromGitter | <zacharycarter> well I think most companies need AWS / something similar because they don't want to host their own infrastructure |
17:47:42 | FromGitter | <Gooseus> yeah, AWS is not for hobbyists with no money, but for startups with capital that needs more than a simple server/app infrastructure they can't be beat |
17:47:57 | FromGitter | <zacharycarter> well that's not really true either |
17:48:15 | FromGitter | <zacharycarter> a lot of AWS services are dirt cheap |
17:48:20 | * | ryanhowe joined #nim |
17:48:27 | FromGitter | <zacharycarter> but their pricing is not the most transparent thing in the world as dom96 alluded to |
17:48:42 | FromGitter | <Gooseus> yeah, this is true, but you can def accidentally leave an instance running and find a bill waiting for you |
17:48:52 | FromGitter | <zacharycarter> sure |
17:50:23 | FromGitter | <Gooseus> but in any case, nim would benefit from having an aws sdk that is easy to use |
17:50:44 | FromGitter | <zacharycarter> I'd like to see a graphql SDK |
17:50:49 | FromGitter | <zacharycarter> then a AWS SDL |
17:50:52 | FromGitter | <zacharycarter> SDK* |
17:52:06 | FromGitter | <Gooseus> yeah, graphql is neat, but I think aws would get more attention |
17:53:11 | GitDisc | <treeform> nim AWS SDK would help me. Just an S3 uploader/downloader. |
17:53:29 | FromGitter | <Gooseus> I mean, I'm messing with this async file downloading thing specifically so I get something interfacing with S3... if I can do that then I can make a case for using nim for this one piece of my job |
17:53:51 | * | xet7 joined #nim |
17:55:13 | FromGitter | <Gooseus> <treeform> exactly, I mean if I can make something serviceable then I'll make a package from it, but I get the feeling a bunch of people in this channel could throw one together in an afternoon/evening |
17:55:15 | GitDisc | <treeform> What I did at my job is used nim to call the python downloader script in a system call. it works but not ideal. |
17:55:45 | * | ryanhowe quit (Quit: WeeChat 1.4) |
17:57:34 | dom96 | Gooseus: please continue asking questions if you're unsure about something :) |
17:58:34 | * | miran_ joined #nim |
18:00:11 | FromGitter | <brentp> hi, I can do: `const lookup:array[117, int] = [1, 1, 1 ...]`. how can I do: `const lookup:array[117, uint64] = [1, 1, 1...]` ? |
18:00:50 | FromGitter | <brentp> the latter gives me `Error: type mismatch: got (array[0..116, int]) but expected 'array[0..116, uint64]'` |
18:01:13 | * | JappleAck joined #nim |
18:02:15 | subsetpark | brentp - just cast your 1s to `uint64` |
18:02:43 | FromGitter | <brentp> each of them? :( |
18:05:06 | FromGitter | <brentp> well, that works. thanks |
18:06:05 | FromGitter | <Gooseus> oh, I will @dom96 , very much enjoying myself so far but feeling a little in over my head coming from mostly node/angular development for the last 5 years or so with just a sprinkling of python |
18:06:41 | FromGitter | <Yardanico> @brentp not each |
18:06:52 | FromGitter | <Yardanico> @brentp const lookup = [1'u64, 1, 1, 1....] |
18:06:54 | FromGitter | <Yardanico> try it like this |
18:07:55 | dom96 | Gooseus: that's cool. Everyone has different experience, I don't recall seeing many people with your experience so do let us know how we can make our docs better |
18:08:34 | FromGitter | <brentp> @Yardanico . ok. will try that next time. I already generated the list with all the 'u64 suffixes |
18:09:45 | FromGitter | <Yardanico> better to try it right now :) |
18:09:56 | FromGitter | <Yardanico> because if you would make that in open-source, others will be shocked :P |
18:11:17 | FromGitter | <brentp> ok. you've shamed me into it. that works and looks nicer. |
18:11:44 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/uIvX/back.png) |
18:11:44 | FromGitter | <Yardanico> remember that this world only with built-in types AFAIK |
18:12:46 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/6dJV/front.png) |
18:13:09 | FromGitter | <zacharycarter> almost done with the high poly |
18:20:11 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:21:34 | * | onionhammer quit (Read error: Connection reset by peer) |
18:26:27 | * | claudiuinberlin joined #nim |
18:34:34 | FromGitter | <mratsim> @dom96, did the documentation PR: https://github.com/nim-lang/Nim/pull/6598 |
18:37:31 | * | Snircle joined #nim |
18:38:35 | * | nsf quit (Quit: WeeChat 1.9) |
18:40:57 | * | Vladar quit (Quit: Leaving) |
18:45:06 | FromGitter | <Bennyelg> how can I do sometjing like this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f0dbb201110b7231fe019e] |
18:48:27 | FromGitter | <Bennyelg> db_postgres.DbConn* |
18:50:38 | FromGitter | <mratsim> I think it will work only if connection[T] is a base type or an enum |
18:52:57 | * | JappleAck quit (Ping timeout: 240 seconds) |
18:54:46 | GitDisc | <GooRoo> @dom96 and if someone sets up the special website for Slack invites, would it be enough to switch to it and get rid of IRC bridge? (just a reminder: Slack has built-in IRC support :)) |
18:55:19 | dom96 | I would want a bridge to here from Slack anyway |
18:56:44 | GitDisc | <GooRoo> then there is no sense |
18:57:19 | dom96 | why? |
18:57:27 | dom96 | Some might like to access this channel via Slack |
18:59:51 | GitDisc | <GooRoo> 'cause it already looks like a shit with all this garbage added by bridges https://habrastorage.org/webt/59/f0/de/59f0def156de7748687065.png |
19:00:32 | * | Viktor joined #nim |
19:00:49 | dom96 | That's a bug in the bot that relays |
19:01:02 | GitDisc | <GooRoo> I know, but nevertheless |
19:01:09 | GitDisc | <GooRoo> it's kinda difficult sometimes to distinguish who writes what |
19:01:31 | GitDisc | <GooRoo> because all messages are sent by bot |
19:03:04 | GitDisc | <laura ☭> Not In Discord™ |
19:03:28 | GitDisc | <laura ☭> you can use a webhook on the discord side and change the name to make a more seamless experience |
19:03:57 | * | kier quit (Ping timeout: 240 seconds) |
19:05:54 | * | JappleAck joined #nim |
19:06:01 | dom96 | sounds like a perfect reason to rewrite this GitDisc bot in Nim ;) |
19:06:27 | * | Arrrr quit (Read error: Connection reset by peer) |
19:06:50 | subsetpark | ...The fuck is GitDisc? |
19:07:19 | GitDisc | <GooRoo> dom96 meant Gitter <-> Discord bridge |
19:08:10 | subsetpark | Ha, if you're writing a bridge between two bridges, good luck |
19:08:19 | dom96 | So I'm trying to put the Nim crown on a t-shirt and it looks weird |
19:08:28 | GitDisc | <GooRoo> @laura ☭ yes, you can |
19:08:28 | GitDisc | <GooRoo> @dom96 and no, not a perfect reason |
19:09:04 | GitDisc | <laura ☭> you coudl totally get the FromGitter user data and make it output better |
19:09:34 | GitDisc | <GooRoo> it's possible, but no one have enough motivation so far |
19:10:02 | GitDisc | <GooRoo> especially considering the fact that this Discord server was born couple of days ago |
19:11:42 | GitDisc | <GooRoo> @dom96 to make my point clear: it's not a perfect reason because there is no sense to re-write something just to make it implemented in another language |
19:11:55 | GitDisc | <GooRoo> if it's not about gaining experience |
19:12:13 | GitDisc | <GooRoo> Nim lacks other more important stuff and it's better to spend some time on it |
19:12:26 | GitDisc | <GooRoo> like websockets that were mentioned above |
19:12:36 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:14:26 | GitDisc | <GooRoo> I would like to see websockets in stdlib. It can be not the best idea though, but at least it would be convenient |
19:14:50 | dom96 | I agree, there are more important things to do. |
19:14:58 | dom96 | But for some it would be a nice project |
19:15:13 | dom96 | It would also be relatively easy |
19:15:48 | * | kier joined #nim |
19:18:20 | * | claudiuinberlin joined #nim |
19:18:47 | GitDisc | <GooRoo> I'm doing a relatively easy thing now. Hope to finish it soon |
19:18:57 | GitDisc | <GooRoo> in Nim of course |
19:19:11 | shodan45 | subsetpark: watched your video. Nice! |
19:19:23 | shodan45 | or at least I think that was you :D |
19:19:47 | shodan45 | python <-> nim? |
19:23:02 | subsetpark | That's me, man. |
19:26:21 | * | yay joined #nim |
19:26:46 | dom96 | So, this is what I came up with. What do you guys think? https://teespring.com/en-GB/nimlang |
19:28:58 | subsetpark | what if you removed the NIM from the back? |
19:29:27 | GitDisc | <GooRoo> or at least the URL |
19:30:10 | dom96 | hrm, to be honest I'm not sure I like the front. But it's difficult to design it any better than this :\ |
19:30:33 | dom96 | Maybe I should make it smaller |
19:30:37 | dom96 | it feels too "in your face" |
19:31:29 | GitDisc | <GooRoo> just keep the position more or less the same. As it seems close to golden ratio |
19:32:36 | dom96 | heh |
19:32:45 | dom96 | so you guys don't like the Nim in the back? |
19:33:42 | * | yglukhov joined #nim |
19:33:43 | GitDisc | <GooRoo> not really |
19:37:06 | dom96 | Araq: Your thoughts? ^ |
19:37:25 | Araq | dom96, huh? what's the topic |
19:37:55 | dom96 | https://teespring.com/en-GB/nimlang |
19:39:04 | * | TjYoco joined #nim |
19:40:25 | Araq | I still like the older crown design better |
19:40:30 | Araq | with the white in it |
19:40:45 | Araq | yeah and the back is weird |
19:40:51 | * | ipjk joined #nim |
19:40:55 | dom96 | We can't mix our designs unfortunately |
19:43:17 | subsetpark | I feel like we only need NIM once; the crown looks cool (white or not), so i think it stands by itself on the back |
19:43:48 | * | Viktor quit (Quit: Viktor) |
19:43:49 | subsetpark | also since the url is in a different font, it would look cleaner to avoid clashing typefaces |
19:46:34 | GitDisc | <GooRoo> BTW I also like the logo with white more |
19:47:39 | * | ofelas quit (Quit: shutdown -h now) |
19:49:41 | * | vlad1777d quit (Ping timeout: 240 seconds) |
19:50:04 | * | vlad1777d joined #nim |
19:51:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:54:12 | Araq | agreed, the back can just be the crown |
19:54:17 | * | xet7_ joined #nim |
19:54:35 | * | xet7_ quit (Client Quit) |
19:54:42 | dom96 | ugh, I can't reuse the same URL |
19:54:56 | Araq | and the url, well no. once upon a time I saw a shirt with "/usr/bin/perl" |
19:55:08 | Araq | and I thought "omg, lol, freak" |
19:55:10 | Araq | XD |
19:56:08 | * | Viktor joined #nim |
19:56:37 | dom96 | well, here is just the front https://teespring.com/en-GB/nimlang1 |
19:56:41 | dom96 | With nothing at the back |
19:56:52 | dom96 | I basically made it smaller |
19:56:56 | * | xet7bot joined #nim |
19:57:47 | Araq | can you also change the logo? |
19:58:05 | dom96 | Like I said, we shouldn't use the old logo |
19:58:14 | dom96 | Branding needs to be the same everywhere :) |
19:58:26 | dom96 | Pretty sure they teach that to marketing people |
19:58:36 | Araq | so throw away the new one |
19:58:58 | dom96 | Too late for that |
19:59:13 | dom96 | The website would look super bad with the old one too |
20:00:12 | Araq | ok so throw away the marketing advice and make the shirt look awesome instead |
20:01:15 | PMunch | What, there are shirts now?! |
20:01:24 | dom96 | I'm playing around with a design |
20:01:41 | PMunch | That looks amazing |
20:01:53 | subsetpark | dom96: you don't like having a little crown on the back? |
20:01:56 | FromGitter | <data-man> Testing, please https://github.com/nim-lang/Nim/pull/6600 |
20:02:08 | PMunch | Definitely prefer the second one "nimlang1" |
20:02:12 | Araq | gotta show everyone your vice, PMunch |
20:02:13 | dom96 | subsetpark: I do, just didn't put it there yet |
20:02:20 | PMunch | My vice? |
20:02:22 | subsetpark | achso |
20:02:23 | dom96 | You mean I should put this one? https://forum.nim-lang.org/images/logo.png |
20:02:43 | Araq | data-man: YAY! better hashing :D |
20:02:54 | PMunch | I don't really use t-shirts a lot though.. |
20:02:56 | * | Trustable quit (Remote host closed the connection) |
20:03:05 | dom96 | PMunch: Hoodie? :) |
20:03:07 | PMunch | A coffee mug however would be amazing |
20:03:16 | * | yay quit (Quit: Textual IRC Client: www.textualapp.com) |
20:03:16 | dom96 | Sure, we can get a coffee mug too |
20:03:22 | PMunch | Well, it's mostly shirts with me. And logos don't really go well on those :P |
20:03:29 | dom96 | ahh :) |
20:04:52 | dom96 | would be cool to get a 3D printed crown |
20:04:59 | dom96 | Anyone good at 3D modelling? |
20:05:11 | PMunch | I could print you a basic one :P |
20:05:20 | PMunch | Pretty shit at modelling though.. |
20:05:30 | dom96 | Araq: So is it that one that you had in mind? |
20:05:46 | * | ipjk quit (Read error: Connection reset by peer) |
20:05:52 | Araq | dom96, I think so |
20:06:25 | * | ipjk joined #nim |
20:06:30 | dom96 | I think that will look super lame on a T-shirt :) |
20:06:52 | dom96 | but if someone can find me a high res version of it I'll put it on to see |
20:07:12 | * | dom96 mostly bored of messing around with teespring now though |
20:07:44 | GitDisc | <GooRoo> @dom96 I guess I can handle 3D model, but only if it's really necessary |
20:08:45 | dom96 | ahh, well, it would be nice to have a 3D recreation of the Nim crown |
20:08:46 | FromGitter | <gokr> Tshirt yeah!! |
20:09:30 | FromGitter | <gokr> What company are you using? |
20:09:33 | Araq | dom96, nim-lang/assets? |
20:09:45 | dom96 | yeah, it's probably somewhere in there |
20:10:03 | GitDisc | <GooRoo> How came that Nim has the old logo and the new one? And since when? And why is the new one less bright? That's because of upcoming 1.0? :) |
20:14:41 | dom96 | because it was modernized/flattenized :P |
20:16:08 | Calinou | <dom96> Anyone good at 3D modelling? |
20:16:12 | Calinou | I know some Blender, but am not really an artist :( |
20:19:42 | FromGitter | <Gooseus> oh man, merchandizing over here? 10 year old project and just making t-shirts now? |
20:20:02 | subsetpark | Yeah, I'd use a coffee mug... |
20:20:09 | FromGitter | <Gooseus> stickers? |
20:20:26 | FromGitter | <Gooseus> don't the kids like to put them on their laptops these days? |
20:22:20 | Calinou | reminds me, I'm getting the Hacktoberfest shirt :P |
20:22:27 | Calinou | I have the 2016 one already, but the logo is barely visible |
20:23:41 | * | lastjedi joined #nim |
20:23:51 | dom96 | I've bought stickers on stickermule |
20:23:58 | FromGitter | <Gooseus> regarding the t-shirt, I prefer the yellow crown on black... I think the nim on both sides and url is fine, you're obviously already a nerd. My suggestion would be to make the stuff on the front smaller cause it is a little in your face |
20:24:02 | dom96 | and they had a store but they removed it :\ |
20:24:04 | dom96 | so I can't sell them on |
20:25:14 | dom96 | So i'd have to buy them and then sell them and send them to people manually |
20:28:53 | FromGitter | <Gooseus> there isn't a place to make a sticker design online that people can buy like the t-shirts? |
20:29:07 | FromGitter | <gokr> https://www.discountmugs.com/category/custom-personalized-ceramic-coffee-mugs/ |
20:29:10 | dom96 | maybe, I'll need to look into it |
20:29:16 | PMunch | Hmm, how can I list the files in a folder in Nim? |
20:29:42 | dom96 | walkDir/walkFiles |
20:29:58 | FromGitter | <Gooseus> ok, I thought you had when you were talking about stickermule stopping something... I'll take a look while I'm curious |
20:31:11 | PMunch | gokr, there you need to buy them and ship them manually though |
20:31:17 | PMunch | What we really want is drop-shipping |
20:32:19 | PMunch | dom96, "pattern is OS dependent" :( I just want to get all files in a folder |
20:32:47 | dom96 | walkFiles("yourDir"), no need to use a pattern |
20:34:53 | FromGitter | <Gooseus> (https://files.gitter.im/nim-lang/Nim/S0HT/image.png) |
20:35:06 | PMunch | Aah okay |
20:35:17 | dom96 | hah |
20:35:28 | FromGitter | <Gooseus> they figured me out quick over at teespring... looks like they also sell stickers in their store, can you not make them as well? |
20:35:42 | PMunch | Haha, I get them as well |
20:35:46 | PMunch | Are these public? |
20:35:59 | dom96 | yep |
20:36:13 | PMunch | So I can buy one right now? |
20:37:30 | dom96 | yep |
20:37:34 | dom96 | :) |
20:37:41 | PMunch | Done |
20:37:48 | dom96 | but beware, I have no idea what it will end up like |
20:38:03 | PMunch | Haha, no worries |
20:38:11 | PMunch | Cool to have none the less |
20:38:17 | dom96 | but hrm |
20:38:23 | dom96 | you might want the one with the nim logo at the back as well |
20:38:28 | dom96 | I dunno, up to you |
20:38:31 | PMunch | In the back? |
20:38:37 | zolk3ri | lol latin kings |
20:39:03 | PMunch | Oh, the one with bigger print has a thing in the back.. |
20:39:13 | PMunch | I prefer the smaller logo though |
20:39:14 | FromGitter | <Gooseus> $.02 cheaper to go for the one without the logo on the back... |
20:39:21 | dom96 | PMunch: yeah, but I will make another one |
20:39:30 | dom96 | With the same size logo at front but small crown at the back |
20:40:31 | FromGitter | <Gooseus> what is the origin of the crown logo? just something cool or is related to the biblical king Nimrod? |
20:41:07 | * | miran_ quit (Ping timeout: 252 seconds) |
20:41:34 | * | firstjedi joined #nim |
20:42:03 | * | firstjedi quit (Max SendQ exceeded) |
20:43:13 | PMunch | We should get this bad-boy on a shirt as well: https://github.com/nim-lang/assets/blob/master/Art/mascot.svg |
20:43:54 | dom96 | lol, that's too scary :) |
20:44:06 | dom96 | We need a cute honey badger |
20:44:13 | PMunch | I think it's cool :P But yeah, I know that it's deprecated |
20:45:22 | * | lastjedi quit (Ping timeout: 258 seconds) |
20:45:47 | dom96 | definitely cool :) |
20:48:02 | PMunch | Is there a way to define --app:libs and --noMain as pragmas? |
20:48:17 | PMunch | Same way you can do {.passL:"whatever".} |
20:58:43 | PMunch | No one? |
20:59:49 | dom96 | no idea |
21:00:02 | PMunch | Hmm, that's annoying.. |
21:00:44 | dom96 | here is the other design https://teespring.com/en-GB/nimlang2 |
21:01:01 | dom96 | I think i'll keep both |
21:01:12 | skrylar | i just hope 2.0 isn't full of stupid |
21:01:21 | skrylar | 1.0 is pleasant |
21:01:24 | PMunch | Hmm, can I have a pragma in an imported module? |
21:01:40 | skrylar | {.push.}? |
21:02:16 | PMunch | I mean I want to put {.pragma: rtl, exportc, dynlib, cdecl.} in an import, so I can do {.rtl.} on procs where I import it |
21:02:39 | gokr | 140 people, nice |
21:03:02 | dom96 | So I shall share https://teespring.com/en-GB/nimlang2 and https://teespring.com/en-GB/nimlang1 :) |
21:03:39 | skrylar | PMunch, https://nim-lang.org/docs/manual.html#pragmas-pragma-pragma |
21:04:31 | PMunch | Yeah I know I can use it, I was wondering if they can be placed in an import |
21:05:22 | PMunch | Apparently not |
21:05:41 | PMunch | Include works though, obviously |
21:06:44 | skrylar | well include is textual inclusion |
21:06:58 | * | derlafff quit (Ping timeout: 255 seconds) |
21:07:05 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:07:06 | skrylar | import is symbolic, why would you be able to modify that which was already compiled |
21:08:13 | PMunch | Yeah I know |
21:08:32 | PMunch | import is using AST though isn't it? |
21:08:49 | PMunch | So it would be entirely possible to have imported pragmas |
21:09:26 | skrylar | sounds like it would make pragmas complicated :\ |
21:09:36 | FromGitter | <gokr> Regarding AWS - my opinion is that for most of us, it's way too complicated and expensive. When we prepaid servers a year in advance - then we managed to match say Upcloud in price. But... in practice, Upcloud (just my current favorite) feels much faster, much easier to manage and I only pay for what I need. And don't need to prepay. |
21:09:38 | FromGitter | <mratsim> write your own import macros? :P |
21:10:00 | skrylar | well. i guess pragmas already have to contend with fully qualified names, because macros can be invoked as pragmas, so |
21:10:04 | FromGitter | <gokr> Then there have historically been areas in the world where only AWS was the option - like Brazil. |
21:11:02 | * | TjYoco quit (Quit: Leaving) |
21:11:10 | skrylar | i guess the syntax would be {.pragma: rtl*, ...} |
21:17:24 | dom96 | PMunch: What should I put on the mug? :) |
21:17:34 | dom96 | Just the crown and text? |
21:17:40 | PMunch | Yeah |
21:17:41 | dom96 | maybe some code on the back? |
21:17:54 | dom96 | Maybe in the future, for now just crown and text |
21:18:29 | * | Viktor quit (Quit: Viktor) |
21:18:31 | PMunch | Well, I'm a minimalist. But a little, slightly faded code snippet could be cool. |
21:18:48 | PMunch | I think I'd prefer the crown and text only though |
21:21:16 | PMunch | Phew, got the whole dynamic loading thing working: https://github.com/h3rald/min/pull/8 |
21:22:25 | PMunch | Got 3/4 PRs down for hacktober now |
21:22:29 | PMunch | Just one more.. |
21:22:36 | dom96 | So I was going to do some coding tonight, instead I created Nim t-shirts and mugs. Hope it was worth it :) |
21:22:54 | PMunch | I'll definitely get one of each |
21:22:57 | PMunch | :) |
21:23:29 | dom96 | Seems I broke teespring https://teespring.com/en-GB/nimlang_mug |
21:23:31 | PMunch | Oh well, I'm off to bed now. Maybe my last PR will be for jester |
21:23:37 | * | vlad1777d quit (Ping timeout: 255 seconds) |
21:24:19 | PMunch | Hmm, I can select all but the black one.. |
21:24:29 | PMunch | Or, I can select it. But it doesn't show |
21:25:02 | dom96 | yeah, that's what I mean |
21:25:04 | dom96 | It's broken :\ |
21:25:15 | PMunch | What happens if I buy one? |
21:25:23 | * | nsf joined #nim |
21:25:34 | dom96 | You'll get missingno on your mug :D |
21:25:43 | PMunch | Haha, that could be cool :P |
21:25:55 | PMunch | Oh well, I'll wait 'till tomorrow |
21:26:00 | PMunch | Good night |
21:26:01 | * | PMunch quit (Quit: leaving) |
21:31:09 | dom96 | Seems to be fixed now |
21:32:01 | * | ipjk quit (Ping timeout: 240 seconds) |
21:32:28 | GitDisc | <GooRoo> @dom96 try t-shirt with the old logo please, just to compare |
21:32:34 | Araq | "No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself." |
21:32:36 | Araq | :-( |
21:33:32 | gokr | federico3: So you don't consider Whatsapp to be a large service? |
21:39:34 | * | Viktor_ joined #nim |
21:41:15 | * | Viktor_ quit (Client Quit) |
21:41:38 | GitDisc | <GooRoo> @gokr, if WhatsApp guys were able to create something good with Erlang, it doesn't necessarily mean that someone else will be able too. And doesn't mean that Erlang (or Elixir) is the best language for such kind of applications. |
21:42:43 | gokr | I never claimed Erlang/Elixir is "the best language for such kind of applications". But I do claim there is enough evidence around to not diss it. |
21:42:54 | gokr | It's uneducated and silly to do that. |
21:43:19 | FromGitter | <dom96> (https://files.gitter.im/nim-lang/Nim/u0fs/Screen-Shot-2017-10-25-at-22.42.24.png) |
21:43:23 | FromGitter | <dom96> @GooRoo ^ |
21:43:57 | gokr | I am just annoyed with people who can't appreciate a "good thing" just because it's not their favorite. |
21:44:33 | Araq | I never meant to "diss" Erlang, it's an impressive piece of technology |
21:45:10 | Araq | you're however in #nim here and Nim targets C and C++, I'm not suddenly gonna target the Erlang VM just because "omg, it SCALES" |
21:45:26 | gokr | I never said you should - someone else said so. |
21:45:33 | GitDisc | <GooRoo> @gokr, well, I like the ideas behind it too: lightweight processes, hot code swapping, “let it crash”, etc. |
21:46:13 | gokr | Araq: And I do know your view, I was more reacting to others. |
21:46:26 | Araq | https://news.ycombinator.com/item?id=10028227 here they argue Erlang would be even better on the JVM, fwiw |
21:46:59 | GitDisc | <GooRoo> @dom96, thanks! Much better now. But need some “glow” effect |
21:47:03 | gokr | Well, who knows. BEAM isn't fast for "crunching". But AFAIK it has very finely tuned network parts. |
21:47:30 | * | derlafff joined #nim |
21:48:35 | gokr | Araq: Just to make it clear - I never said Nim should target BEAM. I am not even sure Nim should even try competing in this area. |
21:48:59 | * | NimBot joined #nim |
21:49:00 | Araq | "Scalability and large actor counts aren't the definitive features of Erlang, though. It's supervision trees, the distribution protocol, the OTP framework, the primacy of tuples and lists as your main and highly flexible data types, a great pattern matching engine for binary formats and regular Erlang terms alike, module-level hotswapping, a crash-only programming model, the ability to have external programs benefit from Erlang semantics via external nodes |
21:49:00 | Araq | and ports, so on and so forth." -- would be nice if somebody spoon-fed these to me one day ;-) |
21:49:43 | * | Viktor_ joined #nim |
21:52:19 | GitDisc | <GooRoo> Erlang's pattern matching for binary formats is nice indeed |
21:52:37 | FromGitter | <GULPF> is there a way to make this compile without warnings? https://play.nim-lang.org/?gist=73e65281c958aa6c6c08a11376db9460 ⏎ compiler complains that `bar` isn't gcsafe because `fWrap` contains GC'd memory, but in practice fWrap is immutable so it shouldn't matter? I don't know much about gc safety |
21:54:28 | Araq | immutability is irrelevant for the GC |
21:55:00 | FromGitter | <data-man> I want to change some functions for parsing numbers. ⏎ ⏎ Current | New ⏎ -------|------- ⏎ proc parseInt | parseInt*T: SomeSignedInt (s: string, number: var T, start: T = 0; maxLen = 0): int ... [https://gitter.im/nim-lang/Nim?at=59f10833b20c64242949ec01] |
21:55:42 | FromGitter | <data-man> Oops, markdown broken :( |
22:00:14 | * | elrood quit (Quit: Leaving) |
22:01:12 | * | gokr quit (Read error: Connection reset by peer) |
22:02:14 | * | dddddd quit (Remote host closed the connection) |
22:02:38 | federico3 | gokr: I can reply on #nim-offtopic if you want to join |
22:04:02 | FromGitter | <GULPF> @Araq ok. is there a way to do what I'm trying to do? that is, having a global containing procs which is accessed from a {.gcsafe.} proc. I know about {.threadvar.}, but it doesn't support let variables. |
22:09:38 | * | gokr joined #nim |
22:10:51 | * | ipjk joined #nim |
22:14:27 | * | Viktor_ quit (Quit: Viktor_) |
22:18:00 | * | onionhammer joined #nim |
22:41:09 | * | sleepyqt quit (Quit: Leaving) |
22:45:19 | * | nsf quit (Quit: WeeChat 1.9) |
22:54:05 | * | JappleAck quit (Quit: Leaving) |
22:57:02 | FromGitter | <Varriount> @dom96 I'd go for a Nim shirt with the crown on the left or right breast, where a pocket might otherwise be. |
22:57:38 | dom96 | I was thinking that |
22:57:39 | dom96 | might try that |
22:58:37 | FromGitter | <Varriount> @GULPF What about constants? |
23:12:15 | * | martinium joined #nim |
23:34:33 | * | xet7bot quit (Quit: quit) |
23:39:30 | * | libman joined #nim |
23:56:25 | joshbaptiste | looking for an online algo "schooly" site that supports nim |