00:04:55 | skrylar | i must have missed when we got this table type |
00:06:05 | GitDisc | <awr> oh it looks like you're supposed to set "i386" if you're using emscripten |
00:08:21 | * | couven92 quit (Quit: Client Disconnecting) |
00:12:01 | * | bkerin quit (Ping timeout: 240 seconds) |
00:25:01 | * | yglukhov quit (Remote host closed the connection) |
00:25:37 | * | yglukhov joined #nim |
00:29:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
00:29:50 | * | Jesin quit (Quit: Leaving) |
00:38:03 | * | ipjk quit (Quit: Leaving) |
01:09:01 | * | gokr quit (Ping timeout: 240 seconds) |
01:12:02 | * | rauss quit (Read error: Connection reset by peer) |
01:13:55 | * | rauss joined #nim |
01:17:21 | * | vlad1777d quit (Ping timeout: 240 seconds) |
01:17:44 | * | rauss quit (Read error: Connection reset by peer) |
01:20:14 | * | rauss joined #nim |
01:39:38 | * | jinshil joined #nim |
01:40:30 | * | jinshil quit (Client Quit) |
01:40:44 | * | jinshil joined #nim |
01:45:01 | FromGitter | <Varriount> @Araq Hm. I'm looking at destructors - would it be possible to have a `=destroyMany` as an optimization for elements that must be destroyed during sequence/array destruction? |
01:50:25 | * | sz0 joined #nim |
01:51:09 | * | kalkin--- joined #nim |
01:54:27 | * | kalkin-- quit (Ping timeout: 240 seconds) |
02:21:46 | * | jinshil_ joined #nim |
02:25:05 | * | jinshil quit (Ping timeout: 250 seconds) |
02:27:27 | * | marenz_ quit (Ping timeout: 240 seconds) |
02:36:11 | * | dddddd quit (Quit: Hasta otra..) |
02:37:41 | skrylar | Varriount: i don't know that there IS an efficient way to destroy many things |
02:38:12 | skrylar | isn't conventional wisdom for that to either use free lists, or in extreme cases, mark-sweep zones? |
02:41:33 | * | chemist69 quit (Ping timeout: 250 seconds) |
02:53:30 | * | NimBot joined #nim |
02:55:11 | * | jinshil_ quit (Quit: Good-bye!) |
02:55:29 | * | chemist69 joined #nim |
02:56:07 | * | kier joined #nim |
02:57:08 | * | redlegion joined #nim |
02:57:08 | * | redlegion quit (Changing host) |
02:57:08 | * | redlegion joined #nim |
03:04:38 | * | yaiyan joined #nim |
03:05:40 | * | arnetheduck joined #nim |
03:06:29 | * | tefter joined #nim |
03:10:09 | * | joshbaptiste joined #nim |
03:14:03 | * | FromGitter quit (Ping timeout: 250 seconds) |
03:14:15 | * | FromGitter joined #nim |
03:14:29 | * | hohlerde quit (Ping timeout: 250 seconds) |
03:14:55 | * | xet7 quit (Ping timeout: 250 seconds) |
03:15:52 | * | ehmry quit (Ping timeout: 240 seconds) |
03:16:12 | * | mindB quit (Ping timeout: 240 seconds) |
03:16:12 | * | planetis[m] quit (Ping timeout: 240 seconds) |
03:16:15 | * | shashlick quit (Ping timeout: 248 seconds) |
03:16:15 | * | dyce[m] quit (Ping timeout: 248 seconds) |
03:16:17 | * | byteflame quit (Ping timeout: 252 seconds) |
03:16:17 | * | MrAxilus[m] quit (Ping timeout: 252 seconds) |
03:16:21 | * | Jipok[m] quit (Ping timeout: 255 seconds) |
03:16:21 | * | Demos[m] quit (Ping timeout: 255 seconds) |
03:16:28 | * | notdekka[m] quit (Ping timeout: 240 seconds) |
03:16:32 | * | jivank[m] quit (Ping timeout: 240 seconds) |
03:16:38 | * | unclechu quit (Ping timeout: 276 seconds) |
03:16:47 | * | watzon quit (Ping timeout: 248 seconds) |
03:16:47 | * | TheManiac quit (Ping timeout: 255 seconds) |
03:24:45 | * | endragor joined #nim |
03:29:54 | * | xet7 joined #nim |
03:46:59 | skrylar | Varriount: how would it work any better than that? |
03:47:20 | skrylar | the best case is each item is in sequential memory and you just either memset it all to zero or unmark the region and throw it away |
03:47:40 | skrylar | if there is some complex destructor logic other than "its all zero now" it would have to run regardless |
03:47:47 | skrylar | so i dunno what 'destroymany' could do different |
03:47:49 | FromGitter | <Varriount> Well, if the destructor for an object needed to do something (say, serialize the object to disc), then doing a batch operation might be faser |
03:48:20 | skrylar | that sounds case specific |
03:49:03 | FromGitter | <Varriount> Well, a more specific variant: memsetting the memory to zero, for security reasons. It's faster to memset an entire region, rather than many multple regions |
03:51:28 | skrylar | i think that would become a secureDelete or such |
03:52:39 | skrylar | although such a securedelete is just going to be a memset to the raw pointer to the seq's cap after normal delete, so template |
03:56:38 | * | abeaumont quit (Ping timeout: 240 seconds) |
04:03:59 | skrylar | reading the stuff for texinfo |
04:04:18 | skrylar | it doesn't seem that bad really. info might be arse, but texinfo seems about the same as rst/sphinx/etc |
04:06:53 | FromGitter | <Varriount> skrylar: Making a language parser, or a renderer? |
04:07:24 | skrylar | Varriount: no, i need to write docs someday |
04:07:57 | skrylar | someone was complaining in another community that "emacs isn't documented" and i was like ". . . . . ." |
04:08:21 | FromGitter | <Varriount> skrylar: *gasp* you mean people actually write documentation? |
04:08:38 | skrylar | i write comments and stuff :( |
04:08:54 | * | FromGitter * Varriount looks at the compiler source code |
04:09:31 | skrylar | althoguh some open source stuff is well documented. GNU stuff seems to be, Debian is. Anki is as well |
04:09:53 | skrylar | SuperMemo (not open source)'s manual is fun to read. |
04:10:03 | skrylar | It's this like, huge brain dump from the author on memory research and learning |
04:11:27 | skrylar | managed to implement most of SM-17 in nim |
04:11:55 | skrylar | http://help.supermemo.org/wiki/SuperMemo_Algorithm |
04:13:02 | FromGitter | <Varriount> skrylar: I don't know about Anki. I could never figure out how to set it up to display my flash cards to me, then let me type corrections |
04:13:56 | skrylar | Varriount: theres some {{type:stuff}} tag you have to use in the stylesheet editor. I havent used it in some time :( |
04:14:21 | skrylar | arch maintainers goofed and pushed anki beta as a "stable" and it broke my stuff, so i moved over to mnemosyne for now |
04:14:28 | skrylar | also anki insists on using a 20 year old algorithm |
04:14:49 | FromGitter | <Varriount> I've been using Quizlet |
04:15:01 | skrylar | meh |
04:15:14 | FromGitter | <Varriount> skrylar: I never appreciated how convoluted the English language was until I started learning German |
04:15:33 | skrylar | Varriount: most of the benefit to those systems is making the cards yourself. |
04:15:56 | skrylar | SM has a lot of text on his 'incremental reading' thing. Which is fancy talk for "read something, use a highlighter on sentences, and make flash cards of those" |
04:16:11 | skrylar | an SM clone in nim would be nifty |
04:16:12 | FromGitter | <Varriount> Oh, I make the cards myself, I just use Quizlet for storage and learning. |
04:16:33 | skrylar | you can also amusingly, use anki for learning anki |
04:16:42 | skrylar | If you do the cards for it :) |
04:16:48 | FromGitter | <Varriount> It's also handy because I can have the flashcard portion of the phone app read the flashcards to me while I'm in the shower |
04:17:02 | skrylar | does quizlet have any spatial separation logic |
04:17:09 | FromGitter | <Varriount> No idea. |
04:17:34 | FromGitter | <Varriount> I'd have to know what spatial separation logic is first. |
04:18:11 | skrylar | its based on the idea that you don't actually need to study every day and you learn more by remembering things you're about to forget than studying things you already know |
04:18:38 | skrylar | the most basic is ex. the Leitner system, where you have a couple boxes for notes and you study the first box daily, and move stuff you know to the next box, where each box is less frequent and failed cards go to box one |
04:19:04 | FromGitter | <Varriount> I think so. It has a "long-term-learning" function for sets of cards. |
04:19:07 | skrylar | so german words you know well take up less review time |
04:19:28 | skrylar | Leitner is pretty simple. SuperMemo's is based on this guys obsession with remembering things |
04:19:38 | skrylar | half the program is like, statistics dumps and charts |
04:21:35 | skrylar | Anki uses SM-2 which is from 1980something. Later versions of SM-* started tracking curves and predictions. |
04:22:17 | skrylar | Latest version (17) has some dual-value thing where it does logistic regression on grades and then has some bayesian shit somewhere that tries to learn how accurate you are at grading yourself O_o |
04:22:40 | FromGitter | <Varriount> So... which one is best? |
04:22:49 | * | Guest49345 quit (Quit: My iMac has gone to sleep. ZZZzzz�) |
04:22:55 | FromGitter | <Varriount> O rather, which real-world implementation is most effective? |
04:23:07 | skrylar | hard to say |
04:23:15 | skrylar | SM is the only one doing anything more than leitner |
04:23:40 | skrylar | Mnemosyne, I'm not sure what they're using. Anki uses the oldest SM. Org-mode has an addon which does SM-5 i think? |
04:24:17 | skrylar | people don't seem to care about these systems outside of languag elearning apparently |
04:24:30 | * | yglukhov joined #nim |
04:25:23 | skrylar | three more functions and nfltk goes on github, whee |
04:25:28 | * | yglukhov quit (Remote host closed the connection) |
04:26:04 | * | yglukhov joined #nim |
04:26:08 | FromGitter | <Varriount> As critical as I am of memory usage, I prefer my GUI libraries to have a native look. |
04:26:23 | FromGitter | <Varriount> Admittedly, that really only means anything on Mac or Windows, but w/e |
04:26:47 | skrylar | I used to. But since I'm more or less forbidden by the universe to use apple products, i stopped caring |
04:27:43 | skrylar | Given how apt people are to use web browser apps that have no business being browser apps, it seems to further hold that usability>"nativeness" |
04:28:02 | FromGitter | <Varriount> Ugh, don't remind me. *looks at slack* |
04:28:13 | skrylar | mattermost is quite pleasant |
04:28:22 | skrylar | Although, Google Wave predicted slack basically. |
04:28:43 | skrylar | If they hadn't horridly mismanaged the beta, we would have desktop clients for an interoperable slack equivalent |
04:28:45 | FromGitter | <Varriount> You mean predated? |
04:29:08 | skrylar | I think Matrix is trying to revive it, but in the most.. hopeless way |
04:30:13 | skrylar | I wish i still had the talk link. Diaspora had a talk on youtube, and they mentioned how hard it is to do anything once someone 'big' enters the market |
04:30:33 | skrylar | Because the cost for Google/Facebook to ape your feature with a bigger branding budget is less than it costs you to get people on to your product |
04:30:58 | * | yglukhov quit (Ping timeout: 264 seconds) |
04:31:16 | skrylar | i start turning more in to RMS as time goes by ._. |
04:33:00 | FromGitter | <Varriount> Meh. The GPL may be nobel, but using it in anything but an application means that your library will never be used. |
04:33:28 | skrylar | It's more that RMS et all put their own blood in to the circus |
04:33:33 | FromGitter | <Varriount> Er, noble |
04:33:38 | FromGitter | <Varriount> How so? |
04:34:29 | skrylar | well if you look at what gets GPLd these days |
04:34:38 | skrylar | It's mostly used as a weapon to say "F U" to people who don't buy enterprise licenses |
04:34:50 | skrylar | It's not actually used to *protect humanity* |
04:35:17 | skrylar | And people are actually getting *mad* at Stallman, because he was patching holes in the GPL |
04:35:25 | skrylar | Like the Tivoization problem |
04:36:02 | * | skrylar shrug |
04:37:51 | skrylar | It's just strange to me that he made all these claims in the late 80s and everyone said that's extreme. Then in the 90s it started happening, but he was still extreme. And in the 2000's, same story. In 2010s we have AIs policing youtube videos for cabals interests, and its like "... Maybe we shoulda listened :B" |
04:38:42 | skrylar | Approaching 2020 its like, people are just embracing the bullshit |
04:38:44 | skrylar | but thats enough of that |
04:39:21 | * | skrylar quit (Quit: Leaving) |
04:39:51 | FromGitter | <Varriount> Switching to a different topic. |
04:40:26 | FromGitter | <Varriount> Regarding the "new memory runtime", I wonder if we could keep the GC, and just have the memory optimizations. |
04:40:57 | FromGitter | <Varriount> I mean, it doesn't seem like the outlined changes actually break existing memory semantics, just enhance them with moves. |
04:59:47 | * | sz0 quit (Quit: Connection closed for inactivity) |
05:38:46 | * | Jipok[m] joined #nim |
05:49:49 | * | unclechu joined #nim |
05:49:49 | * | dyce[m] joined #nim |
05:49:49 | * | Demos[m] joined #nim |
05:49:49 | * | ehmry joined #nim |
05:49:50 | * | watzon joined #nim |
05:49:55 | * | TheManiac joined #nim |
05:49:55 | * | MrAxilus[m] joined #nim |
05:49:56 | * | jivank[m] joined #nim |
05:49:56 | * | byteflame joined #nim |
05:49:56 | * | hohlerde joined #nim |
05:49:56 | * | planetis[m] joined #nim |
05:49:56 | * | shashlick joined #nim |
05:49:56 | * | mindB joined #nim |
05:49:56 | * | notdekka[m] joined #nim |
05:53:06 | * | skrylar joined #nim |
05:53:12 | skrylar | i return bearing gifts https://github.com/Skrylar/nfltk |
05:54:13 | * | abeaumont joined #nim |
06:08:23 | * | rauss quit (Quit: WeeChat 1.9.1) |
06:15:02 | * | gmpreussner quit (Ping timeout: 248 seconds) |
06:15:02 | * | GaveUp quit (Ping timeout: 248 seconds) |
06:15:03 | * | dom96 quit (Ping timeout: 248 seconds) |
06:15:45 | * | GaveUp joined #nim |
06:16:09 | * | gmpreussner joined #nim |
06:16:27 | * | subsetpark_ joined #nim |
06:16:36 | * | dom96 joined #nim |
06:16:36 | * | dom96 quit (Changing host) |
06:16:36 | * | dom96 joined #nim |
06:18:58 | * | SenasOzys joined #nim |
06:22:50 | * | xet7 quit (*.net *.split) |
06:22:50 | * | Elronnd quit (*.net *.split) |
06:22:50 | * | subsetpark quit (*.net *.split) |
06:22:51 | * | koppeh quit (Ping timeout: 246 seconds) |
06:22:53 | * | subsetpark_ is now known as subsetpark |
06:30:03 | * | xet7 joined #nim |
06:35:14 | * | nsf joined #nim |
06:39:45 | * | endragor quit (Remote host closed the connection) |
06:45:20 | skrylar | oh dear. firebird has a ton of intptrt and size_t everywhere |
06:45:23 | skrylar | isn't intptr_t === size_t |
06:46:43 | skrylar | oh. apparently "yes but not 20 years ago" |
06:50:31 | skrylar | Araq, oi. whats the nim version of intptr |
06:50:35 | skrylar | i don't see it in the system module |
07:09:19 | * | flyx quit (Ping timeout: 258 seconds) |
07:10:28 | * | jivank_ quit (Ping timeout: 258 seconds) |
07:12:38 | * | couven92 joined #nim |
07:15:09 | * | endragor joined #nim |
07:17:09 | * | yglukhov joined #nim |
07:20:11 | * | endragor quit (Ping timeout: 250 seconds) |
07:26:25 | Araq | skrylar: "int" |
07:28:44 | Araq | varriount: the problem is that you can't "move" memory that stems from a thread local allocator |
07:29:41 | Araq | maybe we can make the allocator shared and have some logic in the GC to know about moves |
07:31:15 | Araq | but as I said, a GC lures you into the wrong architectural choices |
07:34:43 | FromGitter | <Varriount> Araq: Such as? |
07:35:03 | Araq | read what I wrote about the "--symbolfiles fiasco" |
07:35:16 | FromGitter | <Varriount> Ah, serialization |
07:36:36 | FromGitter | <Varriount> Araq: It seems that the plan is to make ref-less design more attractive |
07:37:38 | Araq | yes |
07:38:52 | * | yglukhov quit (Remote host closed the connection) |
07:43:24 | * | jinshil joined #nim |
07:52:37 | * | Vladar joined #nim |
07:54:11 | * | ftsf joined #nim |
07:56:18 | * | endragor joined #nim |
08:08:28 | * | yglukhov joined #nim |
08:09:18 | * | gokr joined #nim |
08:12:44 | couven92 | Araq, I need editDistance in a private C# project of mine, can I just take the Nim editDistance implementation I have been working with and port it to C#? |
08:13:17 | * | yglukhov quit (Ping timeout: 268 seconds) |
08:13:55 | Araq | yup, the license allows these things |
08:14:07 | couven92 | :) |
08:14:11 | couven92 | Horray for MIT! |
08:14:42 | * | PMunch joined #nim |
08:19:57 | skrylar | i think i wrote one of those for skylihts years ago before learning nim already had one |
08:25:37 | FromGitter | <data-man> @couven92: Try this https://forum.nim-lang.org/t/1730/4 |
08:27:13 | couven92 | @data-man interesting... what does it do differently? Even though I ported the strutils implementation to unicode, I still cannot claim that I understand what the original version actually does :P |
08:29:47 | * | claudiuinberlin joined #nim |
08:32:43 | FromGitter | <data-man> Dynamic programming is so...dynamically incomprehensible. :) |
08:37:07 | * | Kingsquee joined #nim |
08:41:36 | PMunch | Hmm, why do I get a SIGSEGV when I try to do "cstr[0] = 'a'" on a cstring? |
08:42:55 | PMunch | As in: http://ix.io/C6K/ |
08:43:34 | PMunch | Doing "echo cstr[0]" works just fine |
08:45:34 | PMunch | Seems like def- has also had this issue: https://gist.github.com/def-/15feb9775721a13a851e |
08:46:15 | Araq | PMunch: you're writing into constant static data, not supported |
08:47:07 | PMunch | What |
08:47:16 | PMunch | All cstrings are contstant static? |
08:47:28 | Araq | the literals |
08:47:44 | Araq | there is a difference between |
08:47:50 | Araq | var x: string = "x" |
08:48:00 | Araq | cstring(x)[0] = 'a' |
08:48:02 | Araq | and |
08:48:07 | Araq | var x: cstring = "x" |
08:48:25 | * | vlad1777d joined #nim |
08:48:27 | couven92 | PMunch, think about it: we have the same in C, right? |
08:48:52 | PMunch | Ah, so first defining it as a string and then defining a new variable which is the .cstring of that works |
08:49:12 | PMunch | http://ix.io/C6L/ |
08:49:14 | PMunch | Like so |
08:49:55 | PMunch | Is this something that could be checked at compile time to give a more sensible error message? |
08:52:20 | PMunch | Hmm, so is there a way I can make a cstring from only the last part of the string? |
08:54:07 | PMunch | The reason I'm doing this is that nimAES uses cstrings and my application requires me to run 100_000 rounds of ECB encryption. However since ECB is block based the encryptECB function found here: https://github.com/jangko/nimAES/blob/master/nimAES.nim#L285 would only encrypt the first half of my buffer |
08:54:39 | * | floppydh joined #nim |
08:54:52 | Araq | cstrings are declared as "dangerous" and not much checking happens :-) |
09:00:54 | PMunch | Yeah I'm not sure why nimAES uses them.. |
09:01:25 | PMunch | My best guess is that it has been ported directly |
09:01:50 | * | yglukhov joined #nim |
09:03:03 | PMunch | I'm actually having some performance issues with it, so I might rewrite the thing to use arrays and sequences of uint8s instead |
09:04:30 | * | yglukhov_ joined #nim |
09:05:01 | * | yglukhov quit (Read error: Connection reset by peer) |
09:13:41 | * | jinshil quit (Read error: Connection reset by peer) |
09:20:01 | * | marenz_ joined #nim |
09:20:55 | * | endragor quit (Remote host closed the connection) |
09:23:48 | * | endragor joined #nim |
09:28:33 | * | jjido joined #nim |
09:28:39 | * | kalkin-- joined #nim |
09:30:59 | * | Amrykid quit (Ping timeout: 268 seconds) |
09:31:03 | * | vlad1777d quit (Ping timeout: 250 seconds) |
09:31:09 | * | flyx joined #nim |
09:31:36 | * | kalkin--- quit (Ping timeout: 268 seconds) |
09:31:44 | * | Amrykid joined #nim |
09:47:24 | * | endragor quit (Remote host closed the connection) |
09:49:19 | * | endragor joined #nim |
09:50:21 | * | endragor_ joined #nim |
09:50:40 | * | endragor_ quit (Remote host closed the connection) |
09:53:35 | * | endragor quit (Ping timeout: 240 seconds) |
09:57:37 | * | endragor joined #nim |
10:02:35 | * | endragor quit (Remote host closed the connection) |
10:09:55 | * | Arrrr joined #nim |
10:13:53 | * | endragor joined #nim |
10:17:11 | * | jjido quit (Ping timeout: 240 seconds) |
10:27:52 | * | arnetheduck quit (Ping timeout: 260 seconds) |
10:42:50 | * | claudiuinberlin quit (Read error: Connection reset by peer) |
10:56:56 | * | SenasOzys quit (Remote host closed the connection) |
10:58:06 | FromGitter | <alehander42> why if I write ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a0434bef257ad910972697a] |
10:58:35 | FromGitter | <alehander42> createTester still gets NimNode |
10:58:40 | FromGitter | <alehander42> (and cant compile) |
11:04:11 | Araq | that's how the macro system works, inside the macro's body everything is of type NimNode |
11:04:27 | Araq | exceptions are 'typedesc' and 'static[T]' |
11:05:42 | * | pwntus quit (Remote host closed the connection) |
11:06:05 | FromGitter | <alehander42> ok that's what I meant |
11:06:17 | FromGitter | <alehander42> so static[Lang] is what I want |
11:06:18 | FromGitter | <alehander42> thanks |
11:07:22 | * | skrylar quit (Remote host closed the connection) |
11:09:45 | * | xkapastel quit (Quit: Connection closed for inactivity) |
11:10:57 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
11:14:14 | FromGitter | <mratsim> Is there a very simple Nim key-multivalue/single-table database package? I want to write an object pool for Cuda/GPU allocation and keep track of (address: ByteAdress, alloc_size: Natural, in_use: book, last_use_epoch: Natural). Usage will be 1. Is there not(in_use) and alloc_size == requested_size ==> return ByteAddress and in_use = true 2. Table[atAddress].in_use = false when return memory to cache. 3. When |
11:14:14 | FromGitter | ... last_use_epoch pass a certain threshold free the GPU Memory for good. |
11:15:38 | * | SenasOzys joined #nim |
11:17:52 | Araq | my goto solution is sqlite and db_sqlite.nim |
11:18:04 | Araq | can be slow though |
11:20:30 | PMunch | mratsim, isn't a DB a bit overkill for this? |
11:20:39 | PMunch | Or am I misunderstanding you |
11:20:45 | FromGitter | <alehander42> I used sqlite and db_sqlite.nim for something like that a week ago, and eventually I wrote manually a faster format specifically optimized for my data |
11:22:24 | * | zolk3ri joined #nim |
11:22:49 | FromGitter | <mratsim> @pmunch DB is overkill yes, I will have about 8-12GB to track with 200MB to 6Gb objects to track so 1 to 60 entries to track at most. |
11:23:12 | PMunch | Why not just a table? |
11:24:27 | FromGitter | <mratsim> I though about it like Key: ByteAdress, Value(size: Natural, in_use: bool, epoch: Natural) |
11:25:28 | FromGitter | <mratsim> But searching for epoch > threshold looks slow and searching for in_use == false and size == request_size seems ineeficient too |
11:26:35 | * | elrood joined #nim |
11:26:42 | FromGitter | <mratsim> Alternative would be to have 3 tables (ByteAddress, in_use) (ByteAddress, alloc_size) (ByteAddress, epoch) |
11:28:47 | FromGitter | <mratsim> @Araq sqlite also seems like overkill |
11:31:04 | * | jjido joined #nim |
11:34:40 | avsej | I wonder why nim has MIT license, but nimble is BSD |
11:36:59 | FromGitter | <data-man> @mratsim: lmdb & sophia can store multivalue. Bindings are in packages |
11:37:36 | * | yglukhov_ quit (Remote host closed the connection) |
11:38:07 | FromGitter | <mratsim> @data-man I'll check those out thanks |
11:38:10 | FromGitter | <alehander42> @mratsim how often do you have to do those searches? searching in ~70 entries seems fast if you're not doing it all the time |
11:38:15 | * | yglukhov joined #nim |
11:39:39 | FromGitter | <mratsim> Very often, the idea is to avoid the cost of allocating/deallocating GPU memory in tight loops, and GPU memory allocation/deallocation is at least 5x more expensive than on CPU |
11:40:38 | FromGitter | <mratsim> So I expect to search quite often if there is a free memory chunk of the proper size |
11:40:53 | * | PMunch_ joined #nim |
11:42:55 | Araq | avsej: not sure |
11:43:11 | * | PMunch quit (Ping timeout: 240 seconds) |
11:43:43 | FromGitter | <Yardanico> let's ask @dom96 :) |
11:44:08 | FromGitter | <alehander42> so, you do size == request_size, and not size >= request_size |
11:44:30 | FromGitter | <alehander42> does this mean the chunks you'll need are of only several possible sizes ? |
11:44:35 | FromGitter | <alehander42> e.g. 200 400 600 mb etc |
11:45:00 | couven92 | Araq, dom96 should be happy now, merge https://github.com/nim-lang/Nim/pull/6640 ? |
11:45:19 | couven92 | ah, no, wait, I forgot there is this ominous nimscript issue... |
11:45:24 | * | PMunch__ joined #nim |
11:46:27 | FromGitter | <alehander42> if that's true, can't you search from an array of the not-used indexed by size div base_size |
11:47:45 | * | PMunch_ quit (Ping timeout: 248 seconds) |
11:51:45 | * | PMunch__ quit (Quit: Leaving) |
11:51:54 | * | PMunch joined #nim |
11:53:59 | * | dddddd joined #nim |
12:00:36 | FromGitter | <mratsim> Yes 90% of the time I expect in a loop that allocations are of the same size. Mmmh that's an idea, seems a bit magical though |
12:02:25 | * | Snircle joined #nim |
12:02:37 | FromGitter | <mratsim> Reading this tuto about implementing a sqlite clone in C https://cstack.github.io/db_tutorial/parts/part3.html |
12:03:10 | FromGitter | <alehander42> I often found I can transform some of my "keys" to 0..n while adding little limitations and use this trick ⏎ if the others 10% the sizes are unpredictable you can fallback to different search scheme and benchmark if that's good enough |
12:07:45 | * | kobi7 joined #nim |
12:08:12 | FromGitter | <data-man> @mratsim: you need a in-memory database? |
12:09:19 | * | JappleAck joined #nim |
12:16:36 | FromGitter | <data-man> @mratsim: then try https://github.com/OpenSystemsLab/unqlite.nim with updated C sources from https://github.com/symisc/unqlite |
12:24:19 | PMunch | mratsim, multiple tables with object references |
12:25:37 | PMunch | For your epoch stuff you can have a sorted list, booleans can just be two lists for true and false. And then you just need to set some addresses |
12:56:40 | * | nsf quit (Quit: WeeChat 1.9.1) |
13:01:18 | dom96 | Why is Nimble BSD? No particular reason. Just the license I chose. Why is it BSD when Nim is MIT? Pretty sure Nim was GPL back when I created Nimble, so maybe you should be asking why Nim is MIT licensed :) |
13:06:21 | elrood | MIT and 3-clause BSD are pretty much equivalent anyways |
13:08:53 | elrood | if you care about unpermitted use of your name choose BSD, if not go MIT, it doesn't really matter |
13:27:20 | FromGitter | <alehander42> can I force an ident |
13:27:24 | FromGitter | <alehander42> nvm |
13:44:59 | FromGitter | <lawgsy> It says in the official tutorial part 1, that when using slices, b[0..^1] is shorthand for b[0..b.len-1], however when I dynamically create such a sequence b, b[0..b.len-1] works while b[0..^1] yields "Error: no surrounding array access context for '^'" |
13:48:09 | Araq | lawgsy: the rewrite didn't work in every case :-) In Nim devel it does. |
13:49:35 | FromGitter | <lawgsy> @Araq okay :) figured it would have already been caught or even resolved, just couldn't find if it had. |
13:50:10 | * | Guest27009 quit (Quit: Leaving) |
13:50:12 | Araq | but I'm curious, what's the snippet that triggers it? |
13:50:29 | * | RPG joined #nim |
13:50:53 | * | RPG is now known as Guest42015 |
13:55:55 | FromGitter | <lawgsy> let's see, what's the easiest way to drop the snippet in here? pastebin or something? |
13:56:18 | Araq | https://play.nim-lang.org/ |
13:56:23 | Araq | :D |
13:58:25 | FromGitter | <lawgsy> Even better. https://play.nim-lang.org/?gist=3447ad7bbd315fba05c04ffa432dfde5 |
14:02:53 | Araq | ok works with devel |
14:03:04 | FromGitter | <lawgsy> \o/ |
14:03:12 | avsej | power pc LE for some reason detected as big endian. https://github.com/nim-lang/Nim/pull/6713 |
14:03:15 | Araq | if you want it working with 0.17.2, use a 'let' |
14:04:47 | * | gokr quit (Ping timeout: 268 seconds) |
14:05:20 | avsej | Araq, do I need to open PR in csources after the fixing templates, or you will regenerate them later? |
14:05:48 | Araq | it's all generated but you have to wait until we release 0.18.0 |
14:05:48 | FromGitter | <lawgsy> A let statement? But the sequence is altered in the for-loop... so that would yield another type of error |
14:06:13 | Araq | lawgys: you're indexing into the result of a 'reserved' proc call |
14:06:30 | Araq | that can always be put into a let |
14:07:45 | avsej | no problem, I can patch csources until then |
14:09:05 | FromGitter | <lawgsy> I'm not sure if I quite follow, could you give me a brief example or otherwise point me into the right direction? |
14:10:19 | avsej | also could you take a look at this one? https://github.com/nim-lang/Nim/pull/6703, currently tests will fail if example.com is not available or internet disabled |
14:13:28 | * | SenasOzys quit (Remote host closed the connection) |
14:13:41 | * | SenasOzys joined #nim |
14:25:22 | * | TjYoco joined #nim |
14:38:18 | FromGitter | <lawgsy> The problem also occurs in 0.17.2 when the array is passed as a parameter it seems, so even a 'let' statement probably would not solve this |
14:38:25 | FromGitter | <lawgsy> or sequence* |
14:45:15 | FromGitter | <mratsim> @data-man thanks for unqlite as well, actually I think that 3 hash tables (ByteAddress, size), (ByteAddress, in_use) and (ByteAddress, epoch) will have less overhead than any of the sofia, lmdb or unqlite in-memory database. |
14:45:21 | * | jjido quit (Ping timeout: 248 seconds) |
14:45:46 | * | couven92 quit (Read error: Connection reset by peer) |
14:50:14 | * | jjido joined #nim |
14:52:10 | * | koppeh joined #nim |
14:53:03 | Araq | lawgsy: https://play.nim-lang.org/?gist=04ee0b885b1301f6b065798d5457ea55 |
14:54:21 | FromGitter | <lawgsy> oh I see what you mean. alright, thanks :) |
14:56:36 | Araq | don't ask why the spaces around .. ^ are required for 0.17.2 :-) |
14:57:04 | Araq | that's not required in devel, devel rocks... |
14:57:48 | FromGitter | <lawgsy> the spaces around it actually solve the entire issue without adding a let statement :D |
14:59:14 | Araq | it's inefficient then though |
14:59:21 | Araq | reverse is called twice |
15:00:07 | FromGitter | <lawgsy> is it? well I could always slice first, reverse afterwards |
15:01:24 | FromGitter | <lawgsy> not sure why reverse would be called twice though, but reduced[0 .. ^2].reversed should resolve that issue |
15:05:41 | kobi7 | hi guys, is seq a value type? (not ref type?) |
15:10:35 | kobi7 | what does it mean illegal storage access? |
15:10:49 | kobi7 | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
15:11:16 | TjYoco | kobi7 did you initialize your seq with @[] |
15:11:30 | kobi7 | https://gist.github.com/kobi2187/6839b5867034519546f79a4d61c43d6f |
15:12:28 | kobi7 | 'ourlist' is modified in-place. then added to a sequence. (not sure if i need to clone or if it's a value type) but anyway i get this err |
15:13:29 | kobi7 | oh, result has to be initialized? |
15:13:49 | TjYoco | kobi7 yeah, try result = @[] on top of the proc |
15:14:02 | TjYoco | or first line I mean |
15:14:11 | kobi7 | I see. let me try |
15:14:48 | kobi7 | yay! success |
15:15:34 | kobi7 | wouldn't it be better to initialize by default? |
15:16:02 | Araq | yes, it would. turned out to be hard to do internally |
15:16:32 | kobi7 | but some types are initialized, right? |
15:16:57 | TjYoco | result is automatically created as the type the proc returns |
15:17:14 | TjYoco | just seq results aren't initialized |
15:17:17 | kobi7 | I thought it was just a decision, like string is nil instead of "" (empty string) |
15:17:58 | TjYoco | I think he got rid of nil string being default too |
15:19:55 | * | endragor quit (Remote host closed the connection) |
15:20:12 | kobi7 | does anybody know of a permutation algorithm, for example, if the args are: [1,2,3] , 2 the result would be [[1,2], [1,3], [2,3]] |
15:21:01 | kobi7 | maybe it's called combinations? I don't have much math background |
15:22:46 | TjYoco | kobi7 you could probably make it pretty easily, check out sequtils in nim statndard library |
15:22:50 | * | gokr joined #nim |
15:23:52 | * | endragor joined #nim |
15:25:19 | FromGitter | <lawgsy> try looking for a k-subset algorithm |
15:26:30 | kobi7 | thanks. i guess i should browse stack overflow instead of asking here. |
15:27:54 | FromGitter | <lawgsy> I'm sure I've written one in the past, but I'm sure folks on SO have much better solutions if I were even able to find mine |
15:28:33 | * | endragor quit (Ping timeout: 248 seconds) |
15:29:27 | * | jjido quit (Ping timeout: 240 seconds) |
15:29:54 | kobi7 | :) |
15:30:10 | * | PMunch quit (Quit: Leaving) |
15:30:11 | TjYoco | kobi7, this and the nim forums is probably the best place to ask questions. If you want someone to write you an algorithm for that then ask that instead |
15:31:40 | kobi7 | ok |
15:34:34 | FromGitter | <data-man> @kobi7: https://forum.nim-lang.org/t/2812 |
15:34:35 | kobi7 | how do you usually sort in nim? |
15:34:51 | Araq | import algorithm |
15:34:57 | Araq | algorithm.sort(...) |
15:34:59 | kobi7 | stdlib has algorithm.sorted |
15:35:26 | kobi7 | so I need to provide the custom cmp ? |
15:35:57 | FromGitter | <lawgsy> you can use system.cmp for basic comparison such as numbers I believe |
15:36:33 | Araq | I don't think I've ever used system.cmp, always need a custom comparator |
15:38:30 | TjYoco | VSCode has the blue icon back, thank god. That orange one was ugly |
15:39:28 | FromGitter | <mratsim> @kobi7 that's called a Cartesian product |
15:40:31 | FromGitter | <lawgsy> @mratsim I don't think so |
15:40:44 | TjYoco | mratsim idk, I think he wants all the combonations of 1,2,3 that are only 2 long |
15:43:10 | FromGitter | <mratsim> Mmm right |
15:44:10 | FromGitter | <lawgsy> k-subset or k-length subset algorithm should give him all the algorithms from set theory he could wish for |
15:46:21 | Arrrr | we need a template to make cmps https://play.nim-lang.org/?gist=8a1c7c30fbb9f6f33ca44885b15e4efc |
15:46:57 | FromGitter | <mratsim> https://en.wikipedia.org/wiki/Combination#Enumerating_k-combinations @kobi7 maybe it will give you some keywords for your search |
15:47:11 | * | SenasOzys quit (Ping timeout: 248 seconds) |
15:52:38 | * | PMunch joined #nim |
15:53:23 | Arrrr | This is probably more useful https://play.nim-lang.org/?gist=c93424ad398cbe4ba3711bab79f3cfb8 |
15:57:12 | * | SenasOzys joined #nim |
16:00:16 | * | rauss joined #nim |
16:01:33 | GitDisc | <awr> i'm having trouble getting the nim compiler to use emscripten |
16:01:46 | GitDisc | <awr> using `nim c --cc=clang --clang.exe=emcc --clang.linkerexe=emcc --cpu=i386 --o=test.html test.nim` |
16:02:40 | GitDisc | <awr> nim attempts to copmile but gives me Additional info: Requested command not found |
16:02:47 | GitDisc | <awr> even though emcc is on the PATH |
16:03:31 | GitDisc | <awr> (also this is on windows) |
16:06:15 | * | sz0 joined #nim |
16:11:13 | shashlick | Araq: I propose making c2nim a part of koch tools and included in Nim |
16:11:52 | shashlick | having it separate makes it hard to get it compiled and working, especially since it is very useful for pulling in external libraries |
16:12:12 | * | coolp_jim joined #nim |
16:12:26 | * | mindB left #nim ("User left") |
16:15:51 | GitDisc | <awr> oh i think i found the problem |
16:16:15 | GitDisc | <awr> nim attempts to invoke "emcc.exe" when emcc is a batch file on windows |
16:17:40 | GitDisc | <awr> is there a way to stop nim from suffixing the cc with ".exe"? |
16:21:10 | elrood | some wise man quite recently said filenames without extension are barbaric like dynamic typing ;) you could write an .exe which calls the batch file as a workaround ;P |
16:21:43 | FromGitter | <data-man> @Arrrr: Thanks for cmp template! D's stdlib has a similar template (multiSort) for sorting by any number of conditions. |
16:22:05 | FromGitter | <lawgsy> from what I read in extccomp.nim needsExeExt() returns true for windows by default, so I don't think so |
16:22:39 | * | yglukhov quit (Remote host closed the connection) |
16:23:25 | * | yglukhov joined #nim |
16:25:27 | * | yglukhov quit (Read error: Connection reset by peer) |
16:25:56 | * | yglukhov joined #nim |
16:30:42 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:39:02 | * | PMunch quit (Quit: leaving) |
16:39:57 | * | coolp_jim left #nim ("WeeChat 1.9.1") |
16:41:13 | * | PMunch joined #nim |
16:44:09 | * | Jesin joined #nim |
16:45:45 | * | guest5081 joined #nim |
17:06:38 | * | floppydh quit (Quit: WeeChat 1.9.1) |
17:08:40 | * | xkapastel joined #nim |
17:11:51 | * | gokr quit (Ping timeout: 240 seconds) |
17:17:15 | FromGitter | <Varriount> PMunch: You can't pass it an index? |
17:17:32 | PMunch | Huh? |
17:19:23 | * | endragor joined #nim |
17:20:07 | * | Trustable joined #nim |
17:21:04 | * | compt joined #nim |
17:21:54 | compt | Hi i was wondering how good is nim for competitive programming, i.e. does the stdlib contain all the common data structures and algorithms? |
17:23:57 | * | endragor quit (Ping timeout: 240 seconds) |
17:26:43 | FromGitter | <Varriount> PMunch: to the encryption routine |
17:27:32 | FromGitter | <Varriount> compt: Depends. What do you consider "common data structures and algorithms"? |
17:28:01 | * | nsf joined #nim |
17:29:22 | PMunch | compt, yeah most of the stuff should be there |
17:29:36 | PMunch | If not in the stdlib only a `nimble install` away :) |
17:30:29 | PMunch | Varriount, no it didn't take an index. I'm rewriting the thing now. It was using strings internally which I assume would be another thing that's bad for it's performance |
17:30:43 | * | yglukhov joined #nim |
17:31:46 | compt | PMunch: websites like hackerrank do not support nimble install unfortunately :P |
17:31:48 | FromGitter | <Varriount> Well, only if its making string copies |
17:32:36 | PMunch | Hmm, I guess it isn't really |
17:32:50 | PMunch | But it's making uint32s from uint8s |
17:32:54 | PMunch | So copying those.. |
17:33:13 | PMunch | I guess the better idea would be to convert it into taking an array of uint32 |
17:33:44 | PMunch | And rather provide it with a seq[uint8] -> seq[uint32] converter |
17:34:53 | PMunch | And a string -> seq[uint32] |
17:35:41 | * | yglukhov quit (Ping timeout: 268 seconds) |
17:35:42 | compt | Varriount: common data structures - stack queue linked list atleast... |
17:36:53 | * | yglukhov joined #nim |
17:37:05 | compt | also bigint data type |
17:37:11 | * | TjYoco quit (Ping timeout: 240 seconds) |
17:38:08 | compt | or anything comparable to the STL in c++ |
17:39:28 | * | yglukhov quit (Read error: Connection reset by peer) |
17:39:53 | * | nsf quit (Quit: WeeChat 1.9.1) |
17:40:03 | * | yglukhov joined #nim |
17:42:18 | dom96 | big int is available as a separate Nimble package |
17:42:21 | dom96 | the rest is in the stdlib |
17:43:52 | compt | https://nim-lang.org/docs/lib.html doesnt list stack and queue but i can see queue.nim on github. and i can't see stack anywhere |
17:44:20 | dom96 | you can use seq as a stack |
17:44:29 | dom96 | there is a pop function |
17:44:57 | compt | Okay |
17:45:00 | compt | thanks |
17:45:21 | compt | btw any plans to have bigints as official data type? |
17:50:42 | dom96 | Nope. Not for v1 at least |
17:51:12 | * | TjYoco joined #nim |
17:51:50 | compt | Okay, i found https://github.com/nim-lang/Nim/issues/2725 Has been open for a while.. and probably is going to stay so for a while..m |
17:52:07 | * | claudiuinberlin joined #nim |
17:52:44 | compt | Is the destructors work going to remove the GC? and how much significant change will it have on the language and the stdlib? (i know it is for v2) |
17:53:30 | TjYoco | you can turn off the GC right now if you want to |
17:54:51 | * | miran joined #nim |
17:55:23 | compt | I have nothing against the gc yet. Just wanted to know if it would lead to any significant changes to the user facing stdlib api and their working. |
17:55:51 | compt | *it = destructors |
18:02:27 | FromGitter | <mratsim> no before many years |
18:02:30 | FromGitter | <mratsim> not* |
18:02:39 | * | compt quit (Ping timeout: 260 seconds) |
18:05:37 | FromGitter | <mratsim> After serious thinking, instead of an in-memory database, Nim tables are pretty good since you can have multiple equal key, so I can use a Table of [memory_size, ByteAddress] and only track the free cuda object pool. Now I need to find a way to add “Decay” to the Nim tables. I guess DecayingTable that would be interesting to add to the library? (especially for game devs). I’m not too sure how to do it but well. |
18:07:52 | * | Nikky quit (Quit: WeeChat 1.9) |
18:08:03 | * | Nikky joined #nim |
18:11:46 | * | Nikky quit (Client Quit) |
18:11:56 | * | Nikky joined #nim |
18:12:27 | * | Nikky quit (Client Quit) |
18:12:38 | * | Nikky joined #nim |
18:23:29 | * | jsgrant_ joined #nim |
18:52:33 | * | Sembei joined #nim |
18:53:50 | FromGitter | <Varriount> @mratsim You posted those links on epoch-based and QSBR-based memory reclamation. Do you know any more about it? |
18:54:00 | FromGitter | <Varriount> I have some questions, but I'm not sure who I can ask. |
18:54:01 | * | Pisuke quit (Ping timeout: 240 seconds) |
18:55:52 | * | jjido joined #nim |
18:55:54 | FromGitter | <Varriount> compt: Linked lists are in the 'lists' module, although sequences are usually a better choice. |
18:56:17 | * | aerx joined #nim |
18:58:34 | Araq | varriount: ask me ;-) |
18:58:39 | * | claudiuinberlin quit (Ping timeout: 248 seconds) |
18:59:21 | FromGitter | <mratsim> I just know that it's interesting :P and I need to review that in depth :p |
18:59:34 | * | salewski joined #nim |
19:01:14 | salewski | Do we already have a proc like min_by as in Ruby? https://ruby-doc.org/core-2.4.2/Enumerable.html#method-i-min_by |
19:03:38 | Araq | I doubt it |
19:04:21 | salewski | OK, then I will create one. Bye. |
19:07:41 | * | salewski quit (Quit: WeeChat 1.9.1) |
19:19:54 | * | TjYoco quit (Quit: Leaving) |
19:22:51 | * | Vladar quit (Quit: Leaving) |
19:25:00 | FromGitter | <Varriount> Araq: Ok. Looking at that QSBR-based library, it seems like there is only one "pool"of memory - during those quiescent states, all memory tracked will be released. Isn't this a downside - usually bits of memory need to be freed at different times. |
19:25:39 | Araq | well it's not a GC, as I said, it's a queue or similar to it |
19:35:06 | * | vivus joined #nim |
19:42:06 | * | tefter quit (Remote host closed the connection) |
19:46:58 | GitDisc | <awr> @salewski is this what you want? |
19:47:03 | GitDisc | <awr> import sequtils, algorithm |
19:47:04 | GitDisc | <awr> type Fruit* = enum orange, pear, blueberry, strawberry, apple |
19:47:05 | GitDisc | <awr> echo Fruit.mapIt(it).foldl(if ($a).len() < ($b).len(): a else: b) |
19:47:06 | GitDisc | <awr> echo Fruit.mapIt(it).sortedByIt(($it).len())[0 ..< 3] |
19:51:43 | vivus | anybody used this before: https://networkos.net/nim/reactor.nim/ ? |
20:10:40 | * | yglukhov quit (Remote host closed the connection) |
20:17:55 | * | Arrrr quit (Quit: Leaving.) |
20:20:39 | * | salewski joined #nim |
20:21:51 | salewski | GitDisc, the desired minBy() is in no way related to Nim's enums. |
20:22:27 | salewski | Ruby uses the term enumeration in a different way. |
20:23:39 | salewski | What I need: I have objects with a member field like temerature in a seq, and I want to select coldest. |
20:24:55 | salewski | Trivial to code, I start with one of Nim's sort() procs. I just asked because I was not sure if it already exists. |
20:24:59 | salewski | Bye. |
20:27:17 | salewski | (Of course I could do a sort and use el[0], but plain select is faster.) |
20:27:51 | * | kobi7 quit (Ping timeout: 240 seconds) |
20:30:38 | * | yglukhov joined #nim |
20:30:51 | * | yglukhov quit (Remote host closed the connection) |
20:31:06 | * | yglukhov joined #nim |
20:39:27 | * | gokr joined #nim |
20:40:50 | * | Snircle quit (Ping timeout: 258 seconds) |
20:41:18 | * | ipjk joined #nim |
20:42:15 | * | salewski quit (Quit: WeeChat 1.9.1) |
20:52:04 | * | nsf joined #nim |
21:01:47 | * | couven92 joined #nim |
21:02:38 | * | fredrik92 joined #nim |
21:05:37 | * | couven92 quit (Disconnected by services) |
21:05:40 | * | fredrik92 is now known as couven92 |
21:08:24 | FromGitter | <Varriount> vivus: It's nice, however reactor.nim seems primarily connection oriented. I don't see any procedures for reading/writing to/from files |
21:10:37 | * | SusWombat quit (Quit: Leaving) |
21:18:17 | * | Trustable quit (Remote host closed the connection) |
21:19:46 | vivus | @Varriount so its more suited for network applications? |
21:20:14 | FromGitter | <Varriount> vivus: Yes. I don't know how it compares with the async stuff in the stdlib though. |
21:20:55 | vivus | it claims it is better than the stdlib performance-wise |
21:21:55 | dom96 | You shouldn't be worried about performance when it comes to stdlib's async |
21:25:51 | * | SenasOzys quit (Ping timeout: 248 seconds) |
21:35:33 | Araq | it claims that but there is no benchmark to backup that claim |
21:35:53 | Araq | it seems mostly based on "it wraps C, so it's faster" |
21:36:41 | Araq | as if a never ending cascade of "if err goto error;" couldn't be beat performance-wise |
21:40:04 | * | vlad1777d joined #nim |
21:41:56 | GitDisc | <treeform> What are your thoughts on futures/callback based concurrency vs green threads? Do you have your thoughts in a blog post some place? |
21:49:22 | * | miran quit (Quit: Konversation terminated!) |
21:52:58 | * | Jesin quit (Quit: Leaving) |
21:52:59 | * | guelosk joined #nim |
21:54:53 | * | Snircle joined #nim |
21:56:32 | * | Jesin joined #nim |
21:57:56 | * | SenasOzys joined #nim |
22:03:21 | * | jjido quit (Remote host closed the connection) |
22:06:52 | * | jjido joined #nim |
22:07:08 | * | FromGitter quit (Remote host closed the connection) |
22:07:20 | * | FromGitter joined #nim |
22:14:08 | Araq | treeform: could do some live demo about it |
22:18:56 | * | SenasOzys_ joined #nim |
22:19:43 | * | SenasOzys quit (Ping timeout: 248 seconds) |
22:26:09 | * | jjido quit (Ping timeout: 248 seconds) |
22:40:43 | * | jsgrant_ quit (Remote host closed the connection) |
22:41:24 | * | yglukhov quit (Read error: Connection reset by peer) |
22:41:59 | * | yglukhov joined #nim |
22:42:39 | * | aerx quit (Ping timeout: 248 seconds) |
22:46:45 | * | yglukhov quit (Read error: Connection reset by peer) |
22:47:19 | * | yglukhov joined #nim |
22:47:36 | * | PMunch quit (Quit: leaving) |
22:51:56 | * | zolk3ri quit (Remote host closed the connection) |
22:53:05 | * | nsf quit (Quit: WeeChat 1.9.1) |
23:00:29 | * | elrood quit (Quit: Leaving) |
23:06:28 | GitDisc | <treeform> I would prefer a blog post. But I would take a live demo. I really want high level thoughts. I really like green threads (specifically python's gevent), they feel comfortable when I used them, they look just like normal threads we are all used too. Having programmed in JavaScripts promises callback hell, I don't want to do it. |
23:06:58 | GitDisc | <treeform> But wheat probably what makes gevent work is python's stupid GIL and is not at all performant. |
23:07:44 | * | guelosk quit (Ping timeout: 260 seconds) |
23:07:46 | GitDisc | <treeform> With futures you know exactly what is going on. If you know what await macro does etc... and probably can be a ton more performant. |
23:08:46 | GitDisc | <treeform> But I still just kind of want that simple world of global vars and mutable state with a bunch of threads. That probably just can't happen due to limitations of the universe or some thing. |
23:09:08 | GitDisc | <treeform> Gevent does it but probably really slow and all locking which is not a reason to use nim in the first place. |
23:09:38 | GitDisc | <treeform> But then Future style code looks very different from normal looking code and normal libs don't work and with it and block it when they block. |
23:09:42 | dom96 | you won't have to worry about callback hell with async await |
23:10:34 | GitDisc | <treeform> I think I still do? I rewrote my code to use async and now it all not in the style I would write it. |
23:11:12 | GitDisc | <treeform> mainly because you can't use var think. |
23:11:51 | GitDisc | <treeform> So you have to collect all your changes and cart them about like you would in a functional language and return them to apply them. |
23:15:22 | GitDisc | <treeform> It might be better that way. In a concurrent system functional style probably wins. |
23:15:36 | GitDisc | <treeform> it still takes your head to wrap around it. |
23:17:36 | GitDisc | <treeform> Another problem is is the system mainly IO bound or CPU bound? |
23:18:00 | GitDisc | <treeform> concurrency is not parallelism etc... |
23:18:09 | ipjk | Are green threads affected by GIL? I thought that was just native threads. |
23:18:11 | GitDisc | <treeform> (min is IO bound) |
23:18:30 | GitDisc | <treeform> ipjk in python everything is effected by the GIL |
23:19:06 | * | couven92 quit (Quit: Client Disconnecting) |
23:20:22 | GitDisc | <treeform> but maybe you are right they seem to have tons written about it gevent and GIL. I am not an expert on this. |
23:20:52 | ipjk | Neither am I, and I haven't used much python either |
23:23:56 | GitDisc | <treeform> I used gevent a ton it just felt magical. I think the main problem is that async/await just does not feel magical. Just this extra crap you need to put around in your code to make it run. Oh and you can't use any normal features. |
23:24:21 | GitDisc | <treeform> But it does work. And is probably 1000x faster then python. |
23:24:33 | GitDisc | <treeform> So maybe I should not complain. |
23:32:04 | * | yglukhov quit (Read error: Connection reset by peer) |
23:32:37 | * | yglukhov joined #nim |
23:34:29 | FromGitter | <Varriount> treeform: Doesn't gevent just move the async/await to the standard library calls? |
23:40:27 | * | yglukhov quit (Read error: Connection reset by peer) |
23:40:59 | * | yglukhov joined #nim |