00:02:05 | * | sarlalian quit (Ping timeout: 240 seconds) |
00:03:11 | * | brson joined #nim |
00:08:59 | * | sarlalian joined #nim |
00:10:03 | * | Kingsquee joined #nim |
00:12:50 | * | yglukhov quit (Remote host closed the connection) |
00:16:52 | * | ftsf joined #nim |
00:36:10 | * | dddddd quit (Remote host closed the connection) |
00:38:34 | * | sarlalian quit (Ping timeout: 256 seconds) |
00:43:33 | * | sarlalian joined #nim |
01:11:57 | * | zama joined #nim |
01:13:20 | * | yglukhov joined #nim |
01:16:47 | * | Jesin joined #nim |
01:17:59 | * | yglukhov quit (Ping timeout: 258 seconds) |
01:30:20 | * | nmooney joined #nim |
01:30:26 | nmooney | Hi there! |
01:30:38 | nmooney | I'm brand new to Nim -- using it for a networks course. |
01:30:59 | nmooney | I have a type (a tuple) to represent a particular type of packet (comes with a header and a payload, pretty basic). |
01:31:17 | nmooney | What's the most Nim-like way to convert that tuple to a string of bytes I can send over a socket? |
01:33:41 | ftsf | nmooney, cast it to a pointer? |
01:34:32 | nmooney | Gotcha -- will that give me the fields as a series of bytes, like casting a struct to a pointer in C? |
01:34:38 | ftsf | send(mytuple.addr, size) |
01:34:48 | nmooney | ah ok |
01:35:08 | nmooney | So you're suggesting not turning into a string at all, correct? |
01:35:12 | ftsf | correct |
01:35:24 | ftsf | it's already bytes in memory |
01:35:28 | nmooney | great |
01:35:29 | ftsf | just send those |
01:35:42 | nmooney | cool, thanks very much |
01:35:55 | ftsf | np, hope it works =) |
01:37:53 | ftsf | are you using the net module? |
01:38:19 | nmooney | Yeah, that's the goal. |
01:38:31 | nmooney | I haven't actually played with Nim at all up until now so it's a little slow-going right now |
01:38:46 | ftsf | cool, it's really quick once you get going |
01:38:51 | nmooney | First I have to understand what the assignment is asking and then do my best to translate to Nim |
01:38:57 | nmooney | Yeah, the syntax is handy so far, I'm excited to learn it |
01:39:09 | nmooney | most of my quick prototyping code is written in Python so the syntax feels familiar |
01:41:14 | ftsf | https://gist.github.com/ftsf/09190431d86fee69815655d8aa4cdbd3 very basic example |
01:42:28 | ftsf | you can also use `discard socket.send(data, 5)` |
01:42:43 | nmooney | great -- and that should work with tuples as well, assuming I cast the tuple to a pointer? |
01:43:58 | ftsf | i think you'll need to do data.addr if data is a tuple |
01:44:11 | nmooney | also, I need to pad my packets (with null bytes, I think) such that its size is a multiple of four. If I want to store that padding in the tuple, what's the best way to go about that? |
01:44:24 | nmooney | alternatively I could just calculate the size mod 4 in my send method and then send the complement of the size |
01:44:37 | ftsf | you can just add a padding element to the tuple |
01:44:49 | nmooney | I was thinking of type seq[byte]? |
01:46:18 | nmooney | in Python I would do something like '\x00' * paddingLength |
01:46:26 | nmooney | or [0] * paddingLength |
01:48:36 | ftsf | well you could allocate a block of memory that's at least mytuple.len and a multiple of 4 |
01:48:43 | ftsf | and then copy your tuple into it |
01:48:46 | ftsf | then send that block |
01:51:18 | ftsf | https://gist.github.com/ftsf/304fd7c2b7f13825dbead0fd7459ffc2 client and server sending / recving a tuple |
01:52:43 | * | brson quit (Quit: leaving) |
01:53:17 | ftsf | if you run recv.nim and then run client.nim. client.nim will send the tuple and recv.nim will print it out |
01:54:15 | nmooney | that's awesome, thanks so much for the gist |
01:54:42 | nmooney | do you know if nim does any funny alignment stuff like C (well, GCC) does with structs sometimes? |
01:54:58 | nmooney | we have to send packets in a pretty strict format |
01:55:08 | nmooney | but I would guess it'll be laid out in memory exactly as needed |
01:55:18 | ftsf | from the manual: "The implementation aligns the fields for best access performance. The alignment is compatible with the way the C compiler does it." |
01:55:32 | ftsf | I don't know much about the alignment stuff |
01:56:59 | ftsf | http://nim-lang.org/docs/manual.html#foreign-function-interface-packed-pragma |
01:57:38 | nmooney | oh it looks like it actually just directly supports the `packed` pragma |
01:57:41 | nmooney | so that's exactly what I need |
01:57:57 | ftsf | so by default stuff is not packed back to back, but if you want that use {.packed.} |
01:58:09 | ftsf | although it says it only applies to object types, not sure if it'll work with tuples |
01:58:36 | ftsf | but a simple object should behave identically |
01:58:45 | nmooney | yeah I was curious -- just tried it and the compiler didn't complain! so I'm assuming it works |
01:59:23 | ftsf | i wouldn't rely on it, be sure to check |
01:59:56 | nmooney | the daemon on the other end will just terminate the connection if anything is even slightly off, so I'll be sure to get it right heh |
02:20:15 | * | vlad1777d quit (Remote host closed the connection) |
02:23:35 | * | vlad1777d joined #nim |
02:50:55 | * | vlad1777d quit (Remote host closed the connection) |
02:58:43 | * | vlad1777d joined #nim |
02:59:06 | * | chemist69 quit (Ping timeout: 256 seconds) |
02:59:45 | * | vlad1777d quit (Remote host closed the connection) |
03:00:56 | * | pie_ joined #nim |
03:13:16 | * | chemist69 joined #nim |
03:15:30 | * | yglukhov joined #nim |
03:18:04 | * | ftsf quit (Ping timeout: 255 seconds) |
03:18:23 | * | ftsf joined #nim |
03:19:45 | * | yglukhov quit (Ping timeout: 248 seconds) |
03:22:38 | kulelu88 | do you guys know the correct way to install nim? the instructions on the site and github are differnet |
03:22:41 | kulelu88 | rent |
03:23:14 | Xe | kulelu88: what OS? |
03:23:20 | kulelu88 | Xe: Ubuntu |
03:24:03 | Xe | kulelu88: what I do is extract the tarball to ~/.vardene/$VERSION, build it and then symlink that folder to ~/.vardene/active |
03:24:19 | Xe | i have a command line tool that simplifies this, but it's nowhere near anything resembling ready for people to use |
03:24:57 | kulelu88 | Xe: you could convert that CLI tool into a multi-Nim install-manager? |
03:25:30 | Xe | kulelu88: yes, but i don't know if such a thing would be useful |
03:25:44 | kulelu88 | for a rapidly changing language, I guess not much |
03:25:45 | Xe | i'm also considering following the example of https://golang.org/x/build/version |
03:26:29 | kulelu88 | Xe: do you follow these instructions here to install: https://github.com/nim-lang/nim . the download page: http://nim-lang.org/download.html specifies something slightly different |
03:26:44 | Xe | kulelu88: extract tarball, run compile.sh, ???, profit |
03:27:38 | * | kulelu88 scratches head |
03:29:03 | kulelu88 | off-topic... Xe are you still working on those difficult/challenging problems at your job? |
03:29:14 | Xe | kulelu88: my current job is searching for a job |
03:29:55 | kulelu88 | whoa, a lot has changed since we last spoke about a better HTTP lib then. |
03:32:16 | kulelu88 | good luck with your job search Xe |
03:45:30 | * | onionhammer quit (Read error: Connection reset by peer) |
03:46:04 | * | onionhammer joined #nim |
04:33:59 | def-pri-pub | I've been doing a little job searching lately. |
04:34:47 | def-pri-pub | Two companies had me do a HackerRank coding challenge. God I hate that site. It always comes down to a typing speed competition for me... |
05:04:52 | def-pri-pub | Night guys |
05:04:54 | * | def-pri-pub quit (Quit: leaving) |
05:17:24 | * | yglukhov joined #nim |
05:21:34 | * | yglukhov quit (Ping timeout: 240 seconds) |
05:21:55 | * | jivank_ quit (Remote host closed the connection) |
05:22:25 | * | jivank_ joined #nim |
05:48:39 | * | kulelu88 quit (Quit: Leaving) |
05:59:54 | * | chemist69 quit (Ping timeout: 240 seconds) |
06:04:00 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:06:10 | * | space-wizard joined #nim |
06:13:56 | * | chemist69 joined #nim |
06:34:18 | * | nsf joined #nim |
06:47:45 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:57:22 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
07:12:36 | * | yglukhov joined #nim |
07:17:09 | * | yglukhov quit (Ping timeout: 258 seconds) |
07:28:57 | * | bjz joined #nim |
07:30:21 | * | GustavoLapasta joined #nim |
07:32:01 | * | Vladar joined #nim |
07:34:28 | * | ftsf quit (Remote host closed the connection) |
07:47:00 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:59:44 | * | irrequietus joined #nim |
07:59:57 | * | rokups joined #nim |
08:00:30 | * | irrequietus quit (Client Quit) |
08:02:55 | * | irrequietus joined #nim |
08:03:29 | * | bjz joined #nim |
08:12:23 | * | Andris_zbx joined #nim |
08:38:22 | * | yglukhov joined #nim |
08:39:07 | * | yglukhov quit (Remote host closed the connection) |
08:39:20 | * | yglukhov joined #nim |
08:42:18 | * | yglukhov quit (Remote host closed the connection) |
08:59:47 | * | yglukhov joined #nim |
09:02:32 | * | yglukhov quit (Remote host closed the connection) |
09:04:06 | * | yglukhov joined #nim |
09:13:34 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:29:18 | * | vlad1777d joined #nim |
09:31:43 | * | vlad1777d quit (Remote host closed the connection) |
09:35:43 | * | vlad1777d joined #nim |
09:48:47 | * | Kingsquee quit (Read error: Connection reset by peer) |
09:49:00 | * | Kingsquee joined #nim |
09:50:32 | * | bjz joined #nim |
10:00:07 | * | PMunch joined #nim |
10:08:12 | * | yglukhov quit (Remote host closed the connection) |
10:18:36 | * | zielmicha[m] left #nim ("Kicked by @appservice-irc:matrix.org") |
10:20:19 | * | yglukhov joined #nim |
10:24:57 | * | yglukhov quit (Ping timeout: 252 seconds) |
10:31:52 | * | chemist69 quit (Ping timeout: 240 seconds) |
10:38:18 | * | yglukhov joined #nim |
10:51:43 | * | vlad1777d quit (Remote host closed the connection) |
10:54:15 | * | Calinou quit (Remote host closed the connection) |
10:55:10 | * | yglukhov quit (Remote host closed the connection) |
10:55:28 | * | vlad1777d joined #nim |
10:55:49 | * | yglukhov joined #nim |
10:58:24 | * | chemist69 joined #nim |
10:59:54 | * | Calinou joined #nim |
11:17:29 | * | couven92 joined #nim |
11:24:18 | * | SunDwarf quit (Read error: Connection reset by peer) |
11:25:17 | * | bjz_ joined #nim |
11:26:02 | * | bjz quit (Ping timeout: 260 seconds) |
11:38:23 | * | yglukhov quit (Remote host closed the connection) |
11:54:23 | * | yglukhov joined #nim |
12:02:40 | * | Snircle joined #nim |
12:08:28 | * | bjz joined #nim |
12:09:36 | * | bjz_ quit (Ping timeout: 240 seconds) |
12:17:18 | * | GustavoLapasta quit (Ping timeout: 245 seconds) |
12:26:40 | * | vlad1777d quit (Quit: Leaving) |
12:29:47 | * | vlad1777d joined #nim |
12:44:36 | * | chemist69 quit (Ping timeout: 255 seconds) |
12:57:58 | * | yglukhov quit (Remote host closed the connection) |
12:58:14 | * | byte512 joined #nim |
13:04:25 | * | yglukhov joined #nim |
13:08:14 | * | dddddd joined #nim |
13:11:37 | * | chemist69 joined #nim |
13:19:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:34:10 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
13:38:11 | * | byte512 quit (Ping timeout: 240 seconds) |
13:41:29 | * | yglukhov quit (Remote host closed the connection) |
13:42:19 | * | yglukhov joined #nim |
13:42:39 | * | couven92 quit (Quit: Client disconnecting) |
13:49:28 | * | yglukhov quit (Remote host closed the connection) |
13:49:56 | FromGitter | <Varriount> nmooney: just be sure to only transmit data between similar devices if using that method |
14:00:28 | * | RG92 joined #nim |
14:00:30 | * | RG92 quit (Remote host closed the connection) |
14:01:31 | * | yglukhov joined #nim |
14:05:34 | * | yglukhov quit (Ping timeout: 240 seconds) |
14:30:35 | * | Calinou quit (Quit: No Ping reply in 210 seconds.) |
14:32:46 | * | Calinou joined #nim |
14:33:42 | * | yglukhov joined #nim |
14:49:43 | * | chemist69 quit (Ping timeout: 256 seconds) |
14:52:37 | * | yglukhov quit (Remote host closed the connection) |
14:53:19 | * | yglukhov joined #nim |
15:06:26 | * | devted joined #nim |
15:14:32 | FromGitter | <martinium> @kulelu88 the github instructions are the best for installing |
15:14:49 | FromGitter | <martinium> After that all completes run ./koch nimble to install nimble |
15:15:17 | FromGitter | <martinium> The final step is adding symlinks to your usr/bin folder to have binaries available system-wide |
15:16:51 | * | chemist69 joined #nim |
15:18:04 | * | devted quit (Quit: Sleeping.) |
15:20:46 | * | yglukhov quit (Remote host closed the connection) |
15:24:42 | euantor | dom96: Getting a problem with compiling an old Nimble package under nimble 0.8.2, included with the Nim Windows zip: |
15:24:51 | euantor | https://www.irccloud.com/pastebin/jKQRtpz5/ |
15:25:25 | euantor | The migrate.nimble file contains the following https://www.irccloud.com/pastebin/0qeGMejW/ |
15:26:03 | * | yglukhov joined #nim |
15:27:26 | * | devted joined #nim |
15:27:55 | euantor | Installing packages such as `nimble install docopt` also fail with the same error |
15:31:28 | euantor | However, the current (unreleased) code (0.8.3) on GitHub works after I've cloned and built it manually. Could be confusing for new suers trying to install a fresh copy from the website |
15:34:08 | * | devted quit (Ping timeout: 248 seconds) |
15:34:50 | Araq | euantor: nimble 0.8.2 shouldn't show this behaviour, are you sure it's not some older nimble version? |
15:34:59 | euantor | 100% |
15:35:32 | euantor | Deleted the old version of Nim and Nimble and everything off my machine (at work), downloaded the ZIP from the website, installed it as usual |
15:35:59 | euantor | Running `nim -v` gives `Nim Compiler Version 0.16.0`, running `nimble -v` reports `0.8.2` |
15:36:05 | Araq | what does migrate.nimble contain? |
15:36:11 | euantor | Also, the latest tagged release on GitHub for nimble is 0.8.2 |
15:36:19 | euantor | See above: - https://www.irccloud.com/pastebin/0qeGMejW/ |
15:36:35 | euantor | This is the release list for Nimble: https://github.com/nim-lang/nimble/releases |
15:36:41 | euantor | Last release 4 days ago, 1.8.2 |
15:36:59 | euantor | Upgrading to 0.8.3 has fixed the problem |
15:38:33 | Araq | hmm do you have ./nimble/pkgs/nimble* ? |
15:40:13 | euantor | nope |
15:40:40 | euantor | https://usercontent.irccloud-cdn.com/file/q93fcGib/Capture.PNG |
15:43:43 | Araq | hmm do you have a photo of yourself wearing a zebra costume? |
15:44:15 | euantor | Also getting an index out of bounds in db_mysql, to add to the fun ;) |
15:44:21 | euantor | And unfortunately not, sorry! |
15:44:44 | euantor | https://www.irccloud.com/pastebin/Fydo4JVb/ |
15:45:03 | Araq | was some old Garfield joke |
15:45:46 | euantor | Sorry, it's been a long day. It went straight over my head I'm afraid |
15:45:51 | * | yglukhov quit (Remote host closed the connection) |
15:46:22 | Araq | index out of bounds is a query that contains too many ?s |
15:47:34 | euantor | Ah, the queries contain textual content that may contain a "?" character |
15:48:07 | euantor | The tool generate SQL scripts to make changes to a database automatically |
15:48:23 | euantor | So you can make changes to one DB, it creates a migration that can be applied on other databases |
15:49:57 | euantor | The query being ran does in fact contain the "?" character, several times. There doesn't seem to be any way to escape the "?" character either, which is unfortunate |
15:51:05 | Araq | why would there? '?' is not part of the SQL syntax |
15:51:43 | euantor | But it can exist in a string being inserted |
15:52:06 | Araq | yeah, that needs to be fixed asap |
15:52:22 | Araq | but you shouldn't have to quote it |
15:52:27 | euantor | So if I have a raw query containing "INSERT INTO text(data) VALUES ('what did you have for dinner?');", that's completely valid SQL but will break the db_mysql lib |
15:53:05 | euantor | Right now I'm going to get around it with a "rawExec" proc that won't do the query formatting |
15:53:58 | Araq | well that should be: |
15:54:29 | Araq | db.exec("INSERT INTO text(data) VALUE (?)", "what did you have for dinner?") |
15:55:00 | Araq | but still, our db* modules should support your syntax too. |
15:55:09 | euantor | Should be, if you're not reading queries from files like in this strange case that I'm using the module in |
15:55:22 | daekano | wouldn’t you want to encourage parameterized queries? |
15:55:45 | daekano | or is that too much opinion |
16:00:04 | Araq | daekano: encourage yes, but not at the cost of a potential DoS |
16:00:57 | euantor | Encourage yes, but this tool is pretty niche |
16:03:36 | daekano | ah fair — jumped in late |
16:04:07 | * | nsf quit (Quit: WeeChat 1.6) |
16:04:48 | * | yglukhov joined #nim |
16:13:47 | * | Trustable joined #nim |
16:23:01 | * | smt joined #nim |
16:41:12 | smt | So I have a small problem, I've written a little program for me and a few friends that involves unzipping a file, the only library I could find was https://github.com/nim-lang/zip, everything works great until someone else uses it and they get an error that zlib1.dll couldnt be found - is there a way I can statically link that somehow into my nim code so I don't need to include the dll for other people? |
16:44:04 | Araq | smt: there used to be such an option but I think we had to remove it because of Linux package management. just ship the DLL next to your .exe and the program will work for your friends too |
16:45:02 | smt | alright, thanks |
16:45:04 | Araq | if you really prefer a single file exe to distribute, try UPX |
16:49:18 | * | brson joined #nim |
16:51:57 | dom96 | euantor: Yeah, I should release a new Nimble version. |
16:52:49 | dom96 | and yeah, this was fixed recentl |
16:52:51 | dom96 | *recently |
16:53:05 | dom96 | The problem is an outdated /tmp/nimblepkg |
16:53:15 | * | chemist69 quit (Ping timeout: 256 seconds) |
16:54:18 | * | yglukhov quit (Remote host closed the connection) |
16:54:58 | * | yglukhov joined #nim |
16:58:09 | * | chemist69 joined #nim |
17:00:55 | * | yglukhov quit (Remote host closed the connection) |
17:07:50 | * | Amrykid quit (Ping timeout: 258 seconds) |
17:09:09 | * | vlad1777d quit (Quit: Leaving) |
17:10:28 | * | Amrykid joined #nim |
17:12:51 | * | vlad1777d joined #nim |
17:13:23 | * | PMunch quit (Quit: leaving) |
17:21:42 | * | Andris_zbx quit (Remote host closed the connection) |
17:43:25 | * | space-wizard joined #nim |
17:44:21 | * | SunDwarf joined #nim |
17:48:12 | * | couven92 joined #nim |
18:04:23 | * | yglukhov joined #nim |
18:18:04 | * | rupil joined #nim |
18:38:36 | * | GustavoLapasta joined #nim |
18:45:41 | * | sarlalian quit (Ping timeout: 240 seconds) |
18:50:04 | * | nsf joined #nim |
18:50:48 | * | sarlalian joined #nim |
19:06:32 | * | brson quit (Ping timeout: 240 seconds) |
19:09:24 | * | Matthias247 joined #nim |
19:12:51 | * | Pisuke joined #nim |
19:14:24 | * | MyMind quit (Ping timeout: 248 seconds) |
19:20:36 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:36:47 | * | devted joined #nim |
19:45:03 | * | PMunch joined #nim |
19:47:59 | * | kulelu88 joined #nim |
19:52:02 | kulelu88 | if I follow this example: http://nim-lang.org/docs/tut1.html Will I have enough knowledge to be "dangerous" with non-OOP programming in Nim ? |
19:53:28 | Araq | you won't have enough knowledge until you read some sections about templates and macros |
19:55:07 | kulelu88 | Araq: so I cannot get by with procedural programming alone? ie. just functions |
19:55:38 | euantor | Yes, you can |
19:55:49 | euantor | But you won't unlock the full power of Nim |
19:56:04 | dyce[m] | i still havent used macros or templates yet |
19:56:10 | dyce[m] | hmm |
19:56:25 | dyce[m] | any nice examples of where it comes handy? |
19:59:29 | Araq | whenever you copy&paste you should have used a template instead |
19:59:30 | dyce[m] | like the example http://nim-lang.org/docs/tut2.html#templates for template log, that could also be written as a function? |
20:00:08 | Araq | but you don't get lazy evaluation then |
20:00:26 | dyce[m] | ah i see |
20:00:43 | dyce[m] | basically its more overhead |
20:01:05 | dyce[m] | and if scaled, would eat more memory i assume? |
20:02:20 | kulelu88 | Araq: is there a paradigm the compiler follows? eg. OOP ? |
20:02:22 | * | rupil joined #nim |
20:02:49 | Xe | kulelu88 the paradigm in nim is to make software using it |
20:03:12 | Xe | break out data that needs to be put together into an object |
20:03:39 | Xe | write functions using that object where it makes sense |
20:03:53 | Xe | and in general, don't try to reinvent the wheel |
20:04:10 | Araq | the only paradigm that works for compilers is FP. And then you remove lots of FP to get performance back. |
20:04:27 | dom96 | Interesting reply: https://www.reddit.com/r/programming/comments/5nd9rn/announcing_tokio_01/dcceufi/ |
20:05:07 | * | pie_ quit (Quit: Leaving) |
20:05:49 | kulelu88 | Araq: so you spend most of your time writing FP code for the compiler? (and then stripping it away to increase performance) |
20:07:58 | Araq | no, most of the time I live with the inefficiencies :-/ |
20:09:27 | * | pie_ joined #nim |
20:11:21 | Araq | I think you can say that the compiler's architecture is FP and a level below that mutable state abounds. |
20:11:58 | dom96 | So it seems that it's a tradeoff between using more memory or double copying. |
20:12:04 | dom96 | I wonder which is worse. |
20:12:09 | * | GustavoLapasta quit (Quit: Leaving) |
20:13:49 | Araq | double copying is irrelevant. |
20:14:33 | dom96 | how so? |
20:14:37 | kulelu88 | Araq: when you first started writing the compiler, you used another compiled language, right? |
20:14:43 | Araq | in this context. strong words, but hey, prove me wrong. |
20:15:34 | dom96 | so my approach is worse than Rust's? |
20:15:41 | Araq | dom96: memcpy for large-ish buffers is ridiculously fast |
20:16:07 | Araq | and doesn't make the hardware sweat, the hw loves it. |
20:16:10 | dom96 | That's a pity. |
20:17:10 | Araq | dom96: what I said doesn't apply to Nim's asyncdispatch. |
20:17:26 | dom96 | Araq: Did you read the link I sent earlier? |
20:17:38 | Araq | yes |
20:17:56 | dom96 | what are your thoughts? |
20:18:16 | dom96 | the author of that reply says that our model suffers from increased memory usage |
20:18:23 | dom96 | whereas their model suffers from double copying |
20:18:41 | dom96 | what you said seems to imply that double copying is the lesser of two evils |
20:26:09 | Araq | I read no such thing |
20:26:33 | Araq | "our model suffers from increased memory usage"? where do you get this idea from? |
20:28:01 | * | vlad1777d quit (Quit: Leaving) |
20:28:32 | Araq | never mind |
20:28:39 | dom96 | "... The biggest being that you are required to have an allocated buffer for every in-flight operation. So, a server that would otherwise only require a few MB of RSS on linux now could require hundreds of MB of RSS." |
20:29:01 | dom96 | This person is talking about our approach |
20:29:09 | dom96 | because we use the IOCP model |
20:30:55 | * | HoloIRCUser joined #nim |
20:32:09 | Araq | how can you avoid this buffer? |
20:35:08 | * | yglukhov quit (Remote host closed the connection) |
20:35:20 | * | Ven joined #nim |
20:37:44 | Araq | good night |
20:38:45 | * | jinshil joined #nim |
20:45:58 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
20:46:01 | * | yglukhov joined #nim |
20:50:06 | dom96 | Araq: you can't, unless you use the readiness model |
20:53:50 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
20:54:56 | cheatfate | dom96, the main flaw of using select on windows - it doesn't support anything else except sockets, so you not able to use even pipes... |
20:55:38 | dom96 | cheatfate: tokio uses the readiness model with IOCP |
20:55:51 | cheatfate | tokio uses mio, mio uses select |
20:55:51 | dom96 | by calling read(0) essentially |
20:56:11 | dom96 | well, that's not what that person said ^ |
20:56:36 | cheatfate | lets go to tokio source and try to find getqueuedcompletionstatus |
20:56:49 | cheatfate | if you find it then i'm wrong |
20:57:15 | cheatfate | but tokio sources don't have any kind of system specific code... all system specific code are inside of mio |
20:57:34 | * | pie_ quit (Quit: Leaving) |
20:58:15 | cheatfate | hmm looks like i'm wrong and found iocp |
21:00:05 | cheatfate | also looks like they using same scheme like we are (but i'm not very good in rust) |
21:00:12 | cheatfate | https://github.com/carllerche/mio/blob/0e21ae3e4090a32337eae22d52fa11b71b1f0b47/src/sys/windows/selector.rs |
21:00:43 | cheatfate | and what does it mean `call read(0) essentially` |
21:03:54 | dom96 | To emulate the readiness model with IOCP they read 0 bytes to determine if any of the sockets are available for reading |
21:04:29 | * | Ven quit (Read error: Connection reset by peer) |
21:04:46 | * | Ven joined #nim |
21:07:57 | * | brson joined #nim |
21:14:02 | * | smt quit (Read error: Connection reset by peer) |
21:16:51 | * | pie_ joined #nim |
21:32:19 | * | def-pri-pub joined #nim |
21:34:11 | * | Ven quit (Ping timeout: 240 seconds) |
21:34:56 | * | bjz joined #nim |
21:37:57 | * | Ven joined #nim |
21:49:36 | * | Ven quit (Ping timeout: 248 seconds) |
21:54:44 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:04:43 | * | Ven joined #nim |
22:11:13 | def-pri-pub | When compiling with `-d:release` will it also turn off stack tracing and line tracing? |
22:14:09 | * | devted_ joined #nim |
22:17:10 | * | jinshil quit (Remote host closed the connection) |
22:17:36 | * | devted quit (Ping timeout: 260 seconds) |
22:18:35 | * | Trustable quit (Remote host closed the connection) |
22:20:23 | * | bjz joined #nim |
22:20:48 | * | Ven quit (Ping timeout: 256 seconds) |
22:24:03 | * | Ven joined #nim |
22:27:58 | dom96 | def-pri-pub: yes |
22:28:53 | def-pri-pub | mmkay. I'm trying to do some optimizations to my Ray Tracer. Is there an article out there on how to manipulate the GC? |
22:30:27 | * | rusua joined #nim |
22:31:39 | def-pri-pub | I was able to get the code to nearly match the C++ times, but I want to see if I could push it further. |
22:33:16 | dom96 | http://nim-lang.org/docs/gc.html |
22:33:20 | dom96 | should help |
22:34:05 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:36:47 | * | Ven quit (Ping timeout: 255 seconds) |
22:37:41 | * | pie_ quit (Ping timeout: 255 seconds) |
22:44:35 | * | Ven joined #nim |
22:50:06 | * | Ven quit (Ping timeout: 240 seconds) |
22:51:07 | * | PMunch quit (Quit: leaving) |
22:59:37 | def-pri-pub | When messing with the GC it doesn't seem like I've been able to squeeze out any more seconds... |
23:03:04 | * | Vladar quit (Quit: Leaving) |
23:03:45 | FromGitter | <martinium> Prob need to embed asm |
23:03:47 | FromGitter | <martinium> For that |
23:04:16 | * | Ven joined #nim |
23:08:13 | def-pri-pub | Don't mind me, just taking my assembly instructsion for a walk: -( ͡° ͜ʖ ͡°)╯╲___mov_add_imul_lea |
23:09:11 | * | dmi0 quit (Ping timeout: 255 seconds) |
23:19:37 | * | brson quit (Quit: leaving) |
23:20:21 | * | GustavoLapasta joined #nim |
23:20:47 | * | GustavoLapasta quit (Client Quit) |
23:21:34 | * | gokr quit (Ping timeout: 240 seconds) |
23:21:52 | * | Ven quit (Ping timeout: 240 seconds) |
23:22:02 | * | rokups quit (Quit: Connection closed for inactivity) |
23:22:19 | * | nsf quit (Quit: WeeChat 1.6) |
23:24:08 | * | Ven joined #nim |
23:33:33 | * | arnetheduck quit (Ping timeout: 240 seconds) |
23:34:54 | * | Ven quit (Ping timeout: 240 seconds) |
23:36:34 | * | chemist69 quit (Ping timeout: 240 seconds) |
23:41:36 | * | chemist69 joined #nim |
23:43:54 | * | Ven joined #nim |
23:50:09 | * | Ven quit (Ping timeout: 252 seconds) |