00:03:23 | * | mindB joined #nim |
00:03:24 | * | unclechu joined #nim |
00:03:24 | * | dyce[m] joined #nim |
00:03:24 | * | Demos[m] joined #nim |
00:03:24 | * | ehmry joined #nim |
00:03:24 | * | watzon joined #nim |
00:03:30 | * | shashlick joined #nim |
00:03:30 | * | MrAxilus[m] joined #nim |
00:03:30 | * | jivank[m] joined #nim |
00:03:30 | * | TheManiac joined #nim |
00:03:31 | * | notdekka[m] joined #nim |
00:03:31 | * | hohlerde joined #nim |
00:03:31 | * | byteflame joined #nim |
00:03:32 | * | planetis[m] joined #nim |
00:25:07 | * | fvs joined #nim |
00:28:32 | fvs | howdy, nimble installed Prypin's random module. Howto differentiate from pure function as both import random? |
00:31:16 | fvs | also, while i'm on, anyone know what happended to the intersectRect function in nim sdl2: https://wiki.libsdl.org/SDL_IntersectRect |
00:38:02 | GitDisc | <treeform> dom96, i am not sure what you mean by newSocket and accept both create FDs ? |
00:39:05 | * | def-pri-pub quit (Quit: Leaving.) |
00:40:17 | GitDisc | <treeform> oh i see |
00:40:20 | GitDisc | <treeform> yeah that works! |
00:40:22 | GitDisc | <treeform> thanks! |
00:40:38 | GitDisc | <treeform> ``` |
00:40:39 | GitDisc | <treeform> var client = new Socket |
00:40:41 | GitDisc | <treeform> accept(serverSocket, client) |
00:40:42 | GitDisc | <treeform> ``` |
00:40:43 | GitDisc | <treeform> made it all go away |
00:40:57 | GitDisc | <treeform> I feel like accept should just return a socket |
00:41:08 | GitDisc | <treeform> like the c api does? |
00:44:49 | GitDisc | <treeform> I think the bug is in the docs then? |
00:44:50 | GitDisc | <treeform> https://nim-lang.org/docs/net.html |
00:45:06 | GitDisc | <treeform> Creating a server section is wrong? |
00:45:15 | GitDisc | <treeform> it should be `new Socket` |
00:46:21 | * | cspar quit (Ping timeout: 246 seconds) |
00:46:47 | * | jhorwitz quit (Ping timeout: 250 seconds) |
00:46:59 | * | marenz_ quit (Ping timeout: 268 seconds) |
00:49:31 | * | yglukhov joined #nim |
00:53:43 | * | yglukhov quit (Ping timeout: 250 seconds) |
00:55:35 | * | zolk3ri quit (Quit: Lost terminal) |
00:57:15 | * | def-pri-pub joined #nim |
01:11:36 | * | jhorwitz joined #nim |
01:25:22 | * | jhorwitz quit (Quit: leaving) |
01:54:42 | * | kalkin--- joined #nim |
01:58:01 | * | kalkin-- quit (Ping timeout: 240 seconds) |
02:09:16 | * | chemist69 quit (Disconnected by services) |
02:09:21 | * | chemist69_ joined #nim |
02:09:25 | FromGitter | <Varriount> fvs: You can use the module name as a qualifier - "this.random" vs "that.random" |
02:31:23 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:09:57 | * | endragor joined #nim |
03:28:03 | FromGitter | <Varriount> @mratsim until the end of the function. Arrays are value types. |
03:35:07 | * | yglukhov joined #nim |
03:39:37 | * | yglukhov quit (Ping timeout: 260 seconds) |
03:46:11 | * | rauss quit (Read error: Connection reset by peer) |
03:48:08 | * | rauss joined #nim |
03:52:40 | * | SenasOzys_ joined #nim |
04:20:59 | * | fvs quit (Quit: leaving) |
04:33:17 | * | yglukhov joined #nim |
04:37:57 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:26:01 | * | def-pri-pub quit (Quit: Leaving.) |
05:35:25 | * | yglukhov joined #nim |
05:39:44 | * | yglukhov quit (Ping timeout: 248 seconds) |
05:46:56 | * | def-pri-pub joined #nim |
05:53:15 | * | endragor quit (Remote host closed the connection) |
05:56:16 | * | dddddd quit (Remote host closed the connection) |
05:58:51 | * | def-pri-pub quit (Quit: Leaving.) |
06:05:15 | * | nsf joined #nim |
06:28:44 | * | endragor joined #nim |
06:33:04 | * | endragor quit (Ping timeout: 248 seconds) |
07:06:47 | * | rauss quit (Quit: WeeChat 1.9.1) |
07:07:30 | * | endragor joined #nim |
07:21:40 | * | smt quit (Read error: Connection reset by peer) |
07:34:12 | FromGitter | <mratsim> Yes I got sigsev. I tried using a template instead but got name collision in the C compiler so will do another way |
07:36:04 | FromGitter | <mratsim> C++* |
07:48:17 | * | gokr joined #nim |
08:02:17 | * | couven92 joined #nim |
08:05:50 | * | Arrrr joined #nim |
08:05:50 | * | Arrrr quit (Changing host) |
08:05:50 | * | Arrrr joined #nim |
08:14:24 | * | PMunch joined #nim |
08:14:50 | Arrrr | I think this should be a forum thread, more people would see it and participate https://github.com/nim-lang/Nim/issues/6700 |
08:18:26 | * | claudiuinberlin joined #nim |
08:19:04 | gokr | Been reading up on pony, it's quite interesting. I wonder if Nim could go in a similar direction when it comes to concurrency, perhaps not with all the same guarantees, but similar ideas. |
08:32:29 | * | yglukhov joined #nim |
08:41:35 | GitDisc | <GooRoo> Really like how it's done in Nim https://www.reddit.com/r/cpp/comments/7b3z8f/enforcing_code_contracts_with_nodiscard/ |
08:46:13 | Araq | gokr: I'm deluded that my destructors will solve every problem :-) |
08:46:39 | gokr | Araq: Hehe, mmm. |
08:46:57 | Araq | just *move* tasks around, done. |
08:47:21 | gokr | I presume that's the equiv of iso references in pony. |
08:47:46 | gokr | Only one at any given time - can have the reference. And thus has full read and write capability. |
08:48:17 | Araq | there is also "linear lisp", very hard to find good information about it though |
08:48:38 | gokr | Now... pony also has val and tag. The former being immutables sharable by all - for readonly obviously. And tags - as opaque handles that you can do identity check on - and send messages to (presuming they are actors). |
08:50:28 | gokr | Araq: So is it going well? the destructor work? |
08:51:49 | gokr | I would like some higher level description on what it will lead towards - but I guess there is no such writeup, right? I skimmed the one you have and... didn't come away with a clear feeling for how Nim will behave with this stuff. |
08:52:19 | * | livcd quit (Read error: Connection reset by peer) |
08:56:44 | Araq | gokr: I think I know how to do 'sink' parameters and I'm gonna play with a real benchmark against C++/Rust |
08:57:28 | Araq | so yeah, it's going well, albeit a bit slowly since I'm also busy with Nim v1... |
08:58:44 | gokr | Sounds cool :) So a sink param, is that basically the same as a pony "consume" etc? Making sure no other ref is kept, statically. |
08:59:10 | Araq | "consume" nails it, yes. |
08:59:42 | gokr | So far I have also found the "recover" block in pony to be interesting - although confusingly named. |
08:59:57 | * | livcd joined #nim |
09:00:21 | gokr | The idea there is to have the compiler verify that all the stuff you refer to - when in the block - is stuff that is "safely sendable", thus only iso, val, tags. |
09:00:30 | * | floppydh joined #nim |
09:00:54 | gokr | Then the block can only produce a single reference - and that can then safely be an iso for example, if the thing is created inside the block. |
09:01:51 | gokr | The idea being that... since you only can access "sendables" from inside the block - and you create a new thing - then you can return it as an iso - since there can be no other references to it, and the stuff you used to make it - are all "sendables". |
09:05:07 | gokr | Now... the iso and the val - being sharable, that's intuitive etc. Two things more interesting is the fact that a) actors themselves are GCable in pony, so no poison pill etc (neat) and b) the tags can be used to send actors around freely, and you can make calls to them using these tags. |
09:05:19 | gokr | That last bit is pretty cool IMHO. |
09:07:10 | Araq | that's nothing that I'm after. I'm more after a paradigm that would have prevented the --symbolfiles fiasco |
09:07:47 | gokr | Ok, not ... something I am aware of. |
09:10:13 | Araq | well I got this pretty big Nim program called the "compiler" and every time I change something, the full thing is rebuilt. that doesn't scale, the bigger your programs gets, the slower are your compile-times |
09:12:10 | Araq | so ... obvious solution: Store the result of a compiled module to disk. |
09:13:34 | Araq | but that module has cross references to other modules it uses and you need to untangle this mess before you can store anything on disk. |
09:14:26 | gokr | Aha. |
09:14:53 | gokr | To be able to only recompile changed modules? |
09:15:01 | Araq | yes. |
09:15:12 | gokr | So you are moving towards an image model? ;) (just kidding) |
09:15:48 | Araq | and when you're done, you need to ensure this serialization/deserialization step is still much faster than rebuilding the graph from the Nim text file because otherwise you haven't solved the problem |
09:15:59 | gokr | right |
09:16:34 | Araq | and you know what is the fastest way to do this serialization? mmap the file contents |
09:16:46 | gokr | Btw, the Squeak VM guys made this very fast primitive thing for saving/loading a part of object memory by reusing a bit of the GC algorithms. |
09:18:01 | Araq | and suddenly you begin to realize that "pointers are evil" ;-) without pointers, you have blobs and blobs are much better. |
09:18:05 | gokr | ImageSegments. You need to find outgoing pointers inside the segment and do something for those, but otherwise just binary dump it out. |
09:18:10 | gokr | Exact. |
09:18:52 | yglukhov | hey guys, check out my new post: https://www.reddit.com/r/programming/comments/7bc2wu/choose_the_right_language_to_save_the_planet/ |
09:19:21 | Araq | it's also the core solution of getting a REPL environment |
09:19:33 | gokr | Araq: But then... a few years later someone wrote Fuel (a serialization lib) and it turns out it ended up faster than the ImageSegment primitive. |
09:20:40 | gokr | Araq: Yeah, I understand that too. Although... I kinda do wonder how the heck a REPL for Nim will work conceptually/semantically. Macros, templates, static type constraints etc - not really the easiest "incrementally correct" environment to bang away on your keyboard. |
09:22:02 | gokr | In fact, I have a hard time seeing an effective REPL in a statically typed lang at all. But sure, I haven't played with one of course, so no idea. |
09:22:30 | Araq | I see no problem here really, Scala is statically typed and has a REPL iirc |
09:22:40 | PMunch | yglukhov, one thing you don't consider is that a computer is about as efficient as an electrical heater when it comes heating your room. So if you use electrical heating then it evens out |
09:22:47 | Araq | Scala also has a macro system etc etc |
09:23:00 | Araq | PMunch: LOL |
09:23:06 | gokr | (I also wish you would widen the vision - an incrementally modifiable development environment would be more fun than a "mere REPL") |
09:24:05 | FromGitter | <alehander42> haskell's repl is nice too, I've even used c++ repl-s and I like them |
09:25:19 | gokr | So how the heck do they manage the "I am in the middle of non compiling code here"? |
09:25:21 | FromGitter | <alehander42> gokr: you seem like a smalltalk guy : ] |
09:25:32 | gokr | Yup, I am. |
09:25:51 | FromGitter | <alehander42> I am not sure what you mean |
09:26:19 | gokr | So ok, a REPL - I presume you mean a REPL which can actually change code right? |
09:27:00 | gokr | Like, I type something - perhaps changing a type - remove a field from an object definition perhaps. |
09:27:21 | gokr | Or is the answer "well, no, you can't do that"? |
09:27:48 | gokr | I am honestly curious since... it feels like a very hard problem. |
09:28:20 | Araq | I'm not talking about any concrete Nim REPL. I'm talking about a way to structure your programs that give you REPL like qualities |
09:28:32 | gokr | In Smalltalk I have methods being compilation unit (dynamic typing etc), I have auto migration of existing instances so I can do shape changes etc etc. All that seems really hard in a statically typed lang. |
09:29:04 | FromGitter | <alehander42> ah, well I guess the repl-s I used don't really support it, but with the things araq talks, it seems possible in principle |
09:29:22 | gokr | Araq: Right, like... modify proc code and do "reload" of that module (given all data lost that were kept in module vars etc). |
09:29:34 | Araq | for example, when you're designing a game level the last thing you want to do "is to leave the editor, recompile, test it" |
09:29:42 | FromGitter | <alehander42> as a whole a statically typed language can be designed in a way to be easily "hot-reloaded" in a repl |
09:30:02 | gokr | Is there such a language? That's been designed for that? |
09:30:08 | * | skrylar joined #nim |
09:30:15 | gokr | I have never heard of any I think. |
09:30:17 | skrylar | so what was this about somebody requesting a wrapper for firebird? |
09:30:51 | Araq | and now think you have a perfect Nim REPL. does it help? well no, your game engine is on top of that layer and could have a design that makes you leave the editor anyway |
09:33:23 | FromGitter | <alehander42> gokr: I don't think that's a top priority for most statically typed languages, but theoretically if you put it as a goal from day one, there is nothing fundamentally hard about it (but that means shaping the other features around that) |
09:34:01 | * | couven92 quit (Read error: Connection reset by peer) |
09:34:57 | yglukhov | PMunch: haha, but how about coolers that need to keep your cpu temp low? =) |
09:35:41 | PMunch | "coolers", all they do is shift the heat away from the CPU and into your room. So your room gets hot but your computer gets cold(er) |
09:36:15 | skrylar | clearly we just need CPUs that run off negative energy, so you can have a positive and negative energy CPU in the same mobo and they cancel each other out |
09:36:36 | gokr | alehander42: Nothing fundamentally hard about it? Well... just consider shape changes and migration of existing objects in memory for a second. Then tell me it's "not hard". |
09:36:49 | PMunch | Unless you're moving the heat out of your house then your other heating solution is working a bit less whenever you power your computer on. |
09:37:31 | Araq | gokr: you can use the types as constraints and still have your shitty hash table based representation in memory :P |
09:38:01 | gokr | Araq: You mean let the REPL use a different memory model to allow it all? |
09:38:08 | PMunch | skrylar, you jest but then there is https://en.wikipedia.org/wiki/Reversible_computing |
09:38:09 | * | skrylar pretends to write a NimTalk runtime based off ST-80 and sneak it in to araq's code somewhere |
09:38:16 | skrylar | PMunch, I was only half joking. |
09:38:33 | Araq | but you can also just do what every database does and tackle the shape changes |
09:38:35 | PMunch | Reversible computing is really cool though |
09:38:42 | yglukhov | PMunch: fair enough. so maybe efficient languages are only needed in hot environments where air conditioners are used... |
09:38:42 | gokr | skrylar: Spry is a bit of my idea trying to get "interactive coding" on/in Nim. |
09:38:53 | skrylar | I've read about some of the entropy-neutral and some claims of people using cold electricity. I was serious about them working like that, but joking in that I'm not sure those ideas work |
09:39:44 | PMunch | yglukhov, well it depends on what kind of heating you use vs. where you get your electricity from. If you have a coal power plant for electricity and geothermal for heating then it's going to be cleaner to use the regular heater |
09:39:59 | Araq | alter table foo add column bar varchar(100); |
09:40:09 | PMunch | And more efficient languages are better anyways, means you can run more stuff at the same time |
09:40:17 | Araq | ^^ databases are great :-) |
09:40:18 | skrylar | gokr, i wasn't here for the earlier part of the conversation. all i'd say is, well, do what Io does? |
09:40:32 | PMunch | On old hardware you can barely run Atom w/plugins and a browser without the thing grinding to a halt :P |
09:40:48 | skrylar | i went back to my hacked up emacs |
09:41:04 | gokr | skrylar: The gist of it is ... I think a "true REPL" in which you can write your whole program incrementally - not losing data when you code away - is very hard to do in a language like Nim. |
09:41:06 | skrylar | Electron is an abomination. FLTK is quite tolerable |
09:41:16 | PMunch | Yeah, I'm using vim as my main editor |
09:41:25 | PMunch | Notably better battery performance :) |
09:41:26 | skrylar | gokr, ... No. But if you want the code to be efficient, yes. |
09:41:39 | gokr | skrylar: And people aren't agreeing with me :) And I wonder how the heck it's supposed to be solved. |
09:42:04 | gokr | skrylar: Not sure I grokked what you mean. |
09:42:06 | skrylar | Smalltalk/Lisp dealt with those problems. Steal liberally of their wisdoms |
09:42:29 | FromGitter | <qqtop> @skrylar: firebird3.0 wrapper would be nice. currently calling the python fdb driver from nim |
09:42:35 | gokr | skrylar: Well, the thing is - (I am a Smalltalker) - Smalltalk was designed from the get-go to be in runtime all the time. |
09:42:53 | * | vlad1777d joined #nim |
09:43:01 | PMunch | skrylar, think of it this way. An AND gate takes two inputs and has one output. Where does the extra energy go? Heat/entropy! If you had 1:1 gates which somehow connected together in some logical way we would have much less heat/entropy output |
09:43:34 | skrylar | gokr, consider anything you can do in nim you could just transpile to smalltalk though? |
09:43:40 | skrylar | not saying to DO it like that, but in theory |
09:43:46 | gokr | skrylar: Now... having a bit of incrementality goes a long way though. So I applaud any steps in that direction in Nim. For example, hot reloading of "purely code" modules that does no shape changes of data - that would still be useful. |
09:44:00 | skrylar | Javascript is prototype based, so you can just screw with the layout of objects at-will |
09:44:11 | FromGitter | <alehander42> gokr: of course those things are not easy, but that was my point: if you specifically design your memory layout and everything to be easily trackable and reloadable from day one, it wouldn't be hard |
09:44:33 | gokr | alehander42: And my point is ... not sure you would end up with Nim. |
09:45:28 | skrylar | easy copout: don't allow changing objects without a rebuild, do allow functions of identical signatures |
09:45:44 | skrylar | you can make funcalls go through one level of indirection to hot swap them |
09:45:55 | Araq | my point is: databases solved that problem 30 years ago, a static schema doesn't prevent schema changes at all |
09:46:21 | skrylar | Araq, there's bug bears for objects with special initialization requirements tho |
09:46:49 | gokr | Having said all that - Smalltalk is amazing to work in - and that's mainly due to the integrated "always at runtime" dev env. So if Nim could try to get similar things - it would be really cool. I just don't think its a coincidence that Nim (nor most these langs) doesn't have it - more than ... 47 years after Smalltalk. |
09:47:10 | skrylar | gokr, loss of ambition, adherence to C++ thinking, etc |
09:47:15 | skrylar | I mean binary images are bad for releases tho |
09:47:30 | skrylar | neat for livecoding |
09:48:00 | gokr | skrylar: Ideally you would want both, yes. |
09:48:02 | FromGitter | <alehander42> gokr: I agree, I just said it's possible in principle :D |
09:48:17 | skrylar | qqtop: i've never actually used firebird. it sounds neat, i guess? |
09:48:57 | gokr | alehander42: I recall IBM had an incremental coding IDE for C++ way back, perhaps it was actually "VisualAge for C++". Think it was written in Smalltalk. Not sure what happened to it. |
09:48:58 | FromGitter | <alehander42> but still I think a middle ground can be reached and a nim repl which can execute most normal code and reload at least whole modules would be incredibly useful |
09:49:28 | skrylar | the bug bear with hot reloading is something that you deal with in ex. BEAM VM |
09:49:54 | FromGitter | <alehander42> I know a full blown ala smalltalk image capability sounds fun, but usually people expect simpler things from a repl |
09:50:01 | gokr | skrylar: But Beam simply kills/reload, right? It relies on the actor process model, so kinda "cops out". |
09:50:07 | skrylar | If i make object X, with a constructor, change object X to add a new pointer, that pointers not initialized retroactively, so you now have badness. Unless you version objects (which beam does) and also functions. Which can be done, but introduces.. amusement |
09:50:16 | skrylar | gokr, no it kinda java's it |
09:50:38 | gokr | skrylar: ok? |
09:50:52 | skrylar | an old loop with an old socket stays alive until it dies to an error or is finished |
09:50:58 | skrylar | NEW processes are the new code |
09:51:25 | gokr | skrylar: That's what I meant - there is no data migration going on there, right? |
09:51:27 | skrylar | So changing a hot loop won't take effect unless you code in a manual killswitch |
09:51:50 | gokr | They are isolated from each other and simply killed/restarted. |
09:52:03 | skrylar | they aren't isolated though |
09:52:21 | skrylar | the old hot loop will, if it spawns Mushrooms, and you update Mushroom procs, will spawn *new* mushrooms |
09:52:44 | skrylar | but the *loop* itself does not die, unless you code in such a signal |
09:53:18 | skrylar | Lisp also does similar. |
09:54:32 | skrylar | The dangers of using these environments long term, is that you can end up with multiple versions of old code in various places and suddenly your binary image is its own weird hell that isn't constructed from a bootstrap but depends on the menagerie of old things used to write it over time |
09:55:59 | skrylar | like if you make macro A1, use it for function B1, then change A1 to A2, B1 doesn't get recompiled unless you explicitly recompile it, so B1 is now in limbo because compiling it again gives B2, because A is now changed |
09:56:07 | skrylar | anyway, i've spammed enough about livecoding |
09:56:51 | FromGitter | <qqtop> @skrylar: (firebird) yes it is , had been running my companies with it and its predecessor for 30 years |
09:57:21 | skrylar | qqtop: i've been having a hard time getting a pitch on why i should use it for anything |
09:57:51 | skrylar | might look and see how scary fbclient is |
09:58:11 | skrylar | i would love a connector for Rethinkdb but those are strange to write |
09:58:46 | Araq | skrylar: that's pretty much exactly what happens in nimsuggest afaict |
09:59:08 | Araq | stuff holds pointers to outdated versions of some module, eventually it dies with OOM |
09:59:17 | skrylar | yup. standard stuff |
09:59:57 | skrylar | It could be gotten around with a pocket database and dependency tracking, maybe, dunno? |
10:00:41 | Araq | the illusion here is the GC IMO. |
10:01:02 | Araq | it turns crashes into OOM crashes |
10:01:15 | skrylar | livecoding in mixed environments is crashy anyway |
10:01:31 | Araq | you can't abstract over your data model, you have to get that one right and then things work, otherwise they don't |
10:02:07 | skrylar | I did a thing with Embeddable Common Lisp, C99, and SDL, long time ago. Certain types of bugs would kill the whole stack, 'cause they'd cause external things to segfault. And you couldn't ex. replace the main function, because it was pinned to C. So you had to code in such a way that certain things got replaced, and other things required a hard restart |
10:04:12 | Araq | and it's also again a pointer/ownership problem: if you store an ID to the module, guess what you can update the module and everything will access the most recent version of it |
10:04:27 | Araq | no crashes, no leaks. |
10:04:52 | skrylar | changed classes remain broken though |
10:05:07 | Araq | not to mention that I introduced IDs long ago just to be able to debug anything really |
10:05:07 | skrylar | PODs don't if you have default initializers, but if the object has special constructors |
10:08:55 | Araq | gokr: I think the historical mistake is the split between programming languages and databases resulting in messy mixed environments |
10:09:00 | * | Vladar joined #nim |
10:10:04 | Araq | and Smalltalk solved that problem by being much more like a database |
10:10:35 | gokr | skrylar: Sorry phone. Regarding versions of classes - Gemstone (a transactional full blown persistent Smalltalk) uses class versions and can also have multiple versions live at the same time. |
10:11:09 | gokr | Araq: Yeah, and Gemstone is the 100% lets-go-all-the-way example. Full db, full Smalltalk. |
10:11:46 | * | chemist69_ quit (Ping timeout: 264 seconds) |
10:12:39 | skrylar | Gemstone is pretty neat |
10:12:53 | gokr | Yeah, I worked with it in a few projects way back. |
10:13:04 | skrylar | kdb+ is that way as well. its a matrix language bolted on to a database engine |
10:13:08 | skrylar | supposedly |
10:13:11 | gokr | I also recall a 3 hour presentation of how the distributed transactional GC works ;) |
10:14:37 | skrylar | only a couple headers left, and then i can shove this fltk wrapper somewhere |
10:14:57 | FromGitter | <alehander42> I always wondered how there is no language using .git repo-s for heap |
10:15:03 | gokr | But anyway, perhaps the idea with Spry (a language on top of Nim) is easier to pull off. Of course, Nim people wants to code in Nim, so... not really interesting for Nimmers unless they are polyglots. |
10:15:27 | skrylar | i came back to nim because red's priorities are poop |
10:15:35 | gokr | skrylar: Ah, interesting |
10:15:42 | gokr | I track red in the corner of my eye |
10:15:52 | gokr | Perhaps you can help me with Spry instead ;) |
10:16:15 | skrylar | i considered briefly trying to run an ST-80esque language on top of nim |
10:16:30 | * | arnetheduck joined #nim |
10:17:04 | gokr | (that's basically what Spry is - although... I am trying to reinvent Smalltalk a bit too) |
10:19:35 | skrylar | i managed to hack a chunk of the supermemo algorithm in to nim. that was neat. VERRRyyy mathy though |
10:20:24 | skrylar | leads to interesting questions like: what IS an idiomatic way to do regression in nim? |
10:20:43 | Araq | I language on top of Nim doesn't solve anything in my humble opinion. ;-) |
10:20:57 | Araq | I tried to explain why, layers are bad. |
10:21:12 | skrylar | i would only do it because scripting for end users necessitates a scripting engine, even if it just runs nim on that |
10:21:23 | Araq | they can reintroduce all the problems that the underlying layer solved |
10:21:24 | skrylar | otherwise.. macros |
10:21:47 | Araq | pretty sure TCP has a way to do delivering in chunks |
10:22:01 | Araq | HTTP can't use it, wrong level, it has its own chunking |
10:22:03 | gokr | Araq: Hehe, well, I want to recreate the insane productivity of an interactive dev env. I don't think Nim will EVER do that. So I will just have to try myself. |
10:23:59 | skrylar | i still don't get why nim couldn't do that |
10:24:13 | Araq | what exactly? |
10:24:31 | gokr | skrylar: I said "I don't think Nim will ever do it". I didn't say it couldn't do it. I just see where the focus is etc, and I don't see it happening. |
10:25:05 | Araq | alehander42: go for it. mmap to files backed up by .git? |
10:25:21 | gokr | For example, a REPL? I mean come on, IMHO that's a very low end goal. |
10:25:25 | * | chemist69 joined #nim |
10:25:34 | skrylar | what good would mmaping to git do |
10:25:38 | skrylar | just transactional memory? |
10:26:15 | gokr | skrylar: FLTK? |
10:26:32 | floppydh | gokr: the insane productivity of an interactive dev env? |
10:26:39 | skrylar | gokr, yes its an old GUI toolkit |
10:26:40 | gokr | floppydh: Like Smalltalk. |
10:26:48 | gokr | skrylar: I know, I meant more ... "why?" etc |
10:26:51 | floppydh | so many buzzwords, what does it even mean? |
10:27:05 | skrylar | gokr, I have used more or less all the ui frameworks, and fltk pisses me off the least |
10:27:29 | floppydh | gokr: I don't even use a debugger the most time |
10:27:41 | gokr | skrylar: I want to pick one for Spry, i played with libui (Araq's wrapper) - but seems stalled etc. |
10:28:00 | skrylar | he stopped working on libui because libui is too anemic |
10:28:10 | gokr | skrylar: It also seems to have lost steam. |
10:28:18 | skrylar | fltk is what Nuke used once upon a time |
10:28:19 | FromGitter | <alehander42> @Araq yep, it would a great 1 april project |
10:28:21 | gokr | Then there is NimUI - but .. I dunno. |
10:28:53 | gokr | floppydh: See for example pharo.org |
10:29:09 | FromGitter | <alehander42> gork: > REPL? I mean come on, IMHO that's a very low end goal. ⏎ and a realistic and useful goal |
10:29:09 | skrylar | I wrote a timer app 3 times, once in C++/Fltk, later C++/wxWidgets, once in FreePascal, and again in Vala. I got to observe some interesting traits. One of which is that Fltk does all the widgets in-house. So the slider, if set to work in increments of N, will actually do what you asked. Windows sliders for instance don't, while GTK sliders *sometimes* do. |
10:29:36 | gokr | skrylar: Yeah, the advantage of "your own". |
10:29:55 | gokr | skrylar: One reason that Squeak/Pharo still sticks to their own Morphic. |
10:30:00 | skrylar | Well another is that the wxWidgets version, which used maybe <10 primitive controls, took 20mb RAM. Fltk's took <3 |
10:30:04 | floppydh | gokr: but in the end it won't do anything about good abstractions no? - I mean I get it, you want to reduce downtimes and make prototyping easier etc., but I think you can get very close to this with just good tooling in pretty much any PL? |
10:30:31 | skrylar | In fact a minor database app using Fltk for the UI and LuaJit for the DB, still only used <5mb for botht he UI and database |
10:31:27 | gokr | floppydh: It's not only about prototyping etc, if you work on a multimillion loc project - you want a really good env. |
10:31:29 | skrylar | The difference between Fltk's footprint and Wx/Qt/Gtk is huge and it's not apparent what you're getting for it |
10:31:43 | Araq | native widgets. |
10:31:49 | skrylar | shouldn't that be *cheaper*? |
10:31:51 | Araq | for Wx at least. |
10:31:56 | gokr | floppydh: But explaining the Smalltalk env on IRC here is... no point. I have done it so many times, just try it instead. |
10:31:59 | floppydh | gokr: yes I get that but in the end if its bad code you still have bad code, it only changes so much? |
10:32:06 | floppydh | gokr: I will checkout pharo |
10:32:09 | gokr | floppydh: It changes a lot. |
10:32:16 | skrylar | I wrote part of a UI kit in Go, on Win32, using native widgets. It had a negligible footprint. The same app in wx, 20mb |
10:32:24 | floppydh | gokr: I'll check it out |
10:32:27 | FromGitter | <mratsim> @gokr, Haskell has a compiler and an interpreter, the REPL is using an interpreter. |
10:33:09 | gokr | Yeah, that's probably what you end up needing to do I guess - in order to pull of a reasonable not very limited REPL. |
10:33:38 | floppydh | maybe it's just me but I never got much of a point out of a REPL |
10:34:01 | Araq | floppydh: me neither, nor out of debuggers. ;-) |
10:34:30 | skrylar | floppydh, data scientists like them |
10:35:01 | skrylar | you can hook up R Studio or Emacs to an R interpreter, issue commands one line at a time, and then put those commands in a Notebook style interface |
10:35:10 | FromGitter | <alehander42> floppydh: different people use different tools : ) |
10:35:14 | floppydh | skrylar: yeah I get that but they are not really comfortable writing code, I see the point there |
10:35:18 | skrylar | so you go "what happens if i run this test on that dataset" and just run one repl command instead of loading the whole script again |
10:35:23 | gokr | It's about broadening your view on how to make software. If you only think notepad + a command line compiler barfing at you - is everyone anyone will ever need... well. |
10:35:39 | skrylar | floppydh, well having to reload a potentially large dataset every time you run a single transform is unproductive |
10:35:58 | skrylar | repl allows you to change a transform *without* having to load the dataset again |
10:35:59 | floppydh | skrylar: if you just setup a good env where you compile/run on a keypress the rest is about using sane APIs where the initialization time is reasonable |
10:36:05 | livcd | skrylar: I wrote part of a UI kit in Go, on Win32, <- what UI kit ? :-) |
10:36:06 | floppydh | skrylar: oh yes I get that |
10:36:15 | Araq | Mathematica is still my gold standard, not Squeak ;-) |
10:36:23 | skrylar | yes but that initialization time INCLUDES ex parsing a csv file with 1 million records to ram |
10:36:36 | skrylar | the cost of doing that once and then other things in a repl is negligible, the cost of doing it every time is high |
10:36:42 | skrylar | that's an example of where repl/livecode shines |
10:37:01 | skrylar | or ex. a game where you have to reload a heap of 4k textures every time you want to test the shader |
10:37:10 | Araq | skrylar: yeah well, I don't have CSV files in RAM, I import it into to a database ;-) |
10:37:12 | skrylar | yes you can reload the shader at runtime, but that's basically what a repl is doin |
10:37:20 | floppydh | gokr: yeah I agree, I'm not saying its the end-all, just that atm I couldnt care less about a Nim REPL, there so many more things with an actual payoff for everyone then just the data-scientists out there, who won't swtich off python any time soon either way? |
10:37:33 | skrylar | Araq, they have to be in ram for some of those things tho :( |
10:37:48 | Araq | the DB can keep it in RAM, I don't mind |
10:37:57 | gokr | floppydh: I don't want a REPL either - I find it stoneage. |
10:38:02 | floppydh | gokr: interesting |
10:38:16 | floppydh | gokr: what instead? |
10:38:16 | skrylar | It's more to do with ex. running a convolution kernel on data requires it to be in matrix form |
10:38:25 | skrylar | otherwise you're going to shit out 9 DB calls or the like |
10:38:52 | FromGitter | <alehander42> floppydh: repl shines in many cases when you need to experiment with little things/new libraries/etc ⏎ what you people are doing is "change this file, switch to console, compile and run it, change it again" which works but it's just a hack and it sucks for those cases |
10:39:01 | gokr | floppydh: I want a fully running incremental dev env. Where I can modify the code while it is running. When i can pause in the debugger, change a line, restart that particular method/proc and just keep going. |
10:39:31 | floppydh | skrylar: there's clearly a payoff there for data scientists atm, which can also be overcome with good architecture, like could work with spearating into processes and do IPC or whatev, but still, atm theres clearly good reasons to use them for data scientists |
10:39:33 | gokr | floppydh: An env where I can query the structure of the code itself. Show me all uses of this and that? Show me all implementors of this and that, etc etc. |
10:39:33 | FromGitter | <alehander42> there is a reason why people use repl-s all the time in dynamic languages and it's not because they're data scientists, but because they are powerful and useful |
10:39:39 | skrylar | Araq, admittedly, Rethinkdb *is* powerful enough to do a lot of those shenanigans on the DB :-) |
10:39:50 | floppydh | gokr: I see |
10:39:58 | gokr | floppydh: Smalltalk has all this. |
10:40:12 | gokr | floppydh: Now, Nim has tons of other cool things. |
10:40:20 | skrylar | rethink is awesome. i haven't tried with postgres or mongo and such |
10:40:26 | skrylar | like, doing power regression on records |
10:40:34 | gokr | skrylar: isn't there already a rethink driver for Nim? |
10:40:41 | skrylar | gokr, no idea |
10:40:46 | gokr | I think there is |
10:40:50 | floppydh | alehander42, I'm sorry but if you're not actually having the initialization problem like skrylar talked about, its just a matter of a good env setup, I do one keypress and it compiles and runs async in the bg, I don't have to switch to anything |
10:41:01 | skrylar | gokr, araq was just talking about using a DB instead of ex. Pandas |
10:41:12 | gokr | https://github.com/search?utf8=%E2%9C%93&q=rethinkdb+nim&type= |
10:41:22 | * | elrood joined #nim |
10:42:12 | Araq | but yeah, a REPL is two different things really: |
10:42:23 | Araq | - a way to tinker with a new language and its libraries |
10:42:50 | Araq | - a way to keep your data in RAM |
10:43:08 | skrylar | On Rethink, you can have reql map/reduce. So you can do things like just ask it to compute Pearson R across shards. But doing that in ex Postgres is.. derpy, if possible at all |
10:43:39 | gokr | skrylar: This one looks pretty active and fresh: https://github.com/OpenSystemsLab/rethinkdb.nim |
10:43:40 | FromGitter | <alehander42> floppydh: which is still slower, still uses two different area-s (you edit somewhere and see the results in other place), and you can't still do a lot other things possible in a repl ⏎ a very powerful IDE might be able to replace a repl as a whole but most editors are not that good ⏎ after all we all are using terminal-s as repl-s for our os-es, it's obviously a useful concept |
10:44:54 | floppydh | alehander42, we're not, a shell is not a REPL, it does not persist state, in any case, I don't agree there, if the compile-times and such aren't a problem, it's not a problem and I'm way more comfortable and faster in my editor then on a half-baked REPL with its own bindings |
10:45:18 | skrylar | but the repl is supposed to be cooked at 200 degrees :< |
10:45:21 | gokr | There is a reason Dan Ingalls blew Steve Jobs away when he live coded smooth scrolling and changed width of scroll bars - in front of Steve's eyes, in a minute or two. Without restarting anything. |
10:45:21 | floppydh | if you don't have setup an editor you enjoy then yes I see a benefit |
10:45:53 | floppydh | gokr: I'm not familiar with the incident, but Steve Jobs probably shouldn't be a reference for anything |
10:46:36 | gokr | floppydh: "incident"... that was when Steve was at PARC and got the whole inspiration for GUIs. |
10:47:05 | gokr | floppydh: The GUI he was shown was in fact Smalltalk - the first bitmapped window environment. |
10:47:10 | FromGitter | <alehander42> floppydh: it is a repl, it persists state using your whole file system, you write a line of code and it does an action / responds with a result |
10:47:37 | floppydh | alehander42, you're going too far out there to my taste, lets just agree to disagree |
10:47:42 | FromGitter | <alehander42> that's the most repl thing I've ever seen in my life and if you think the shell doesn't act as a repl we have just too different views on the whole thing |
10:48:00 | skrylar | well i mean |
10:48:06 | skrylar | shells read, evaluate, print, and loop? |
10:48:19 | floppydh | but then Nim has a REPL, because you can use the shell in that capacity |
10:48:22 | FromGitter | <alehander42> I am talking about the ux of interactive repl loop |
10:48:24 | floppydh | what are we even talking about at this point |
10:48:53 | skrylar | well gokr is evangelizing livecoding (which is an awesome topic). i'm not sure what this shell vs repl thing is |
10:48:53 | floppydh | gokr: so REPL = quick-prototyping? - again I think that does not necessitate a REPL as discussed, nim could be used like that |
10:49:00 | FromGitter | <alehander42> the shell is a "ui" for the os, a nim repl would be a ui for nim code , come on.. |
10:49:43 | floppydh | alehander42, Nim REPL would require hotswapping of compiled c code e.g., it's very different from just a "ui" |
10:50:00 | FromGitter | <alehander42> that's an implementation detail |
10:50:13 | floppydh | I'm out |
10:50:32 | dom96 | Hi guys |
10:50:32 | FromGitter | <alehander42> I am talking about the ux of such a program, of course I agree it's way harder to achieve in Nim |
10:50:55 | dom96 | what are you guys disagreeing about? |
10:51:26 | Araq | repls, live coding, the meaning of programming |
10:51:52 | dom96 | Fun |
10:53:26 | gokr | This is a 2 min video showing a bit of coding on the fly in Smalltalk, modifying code and restarting the stack etc: https://www.youtube.com/watch?v=1kuoS796vNw |
10:54:17 | gokr | Just found it by googling, there is tons out there obviously. But I mean, raise the freaking bar here people. |
10:55:13 | skrylar | gokr, livecoding is upper quantile programmer stuff tho |
10:55:16 | skrylar | like macros are |
10:55:22 | floppydh | gokr: the issue I see here is that its tooling only, what people need is better models to reason about program data/logic, things like immutable data types e.g. tackle these, tooling is important, but at the end if you need to step through your thing in order to understand it, there's a limit you'll be able to do no? |
10:56:14 | gokr | skrylar: But it's not hard! I mean, a Smalltalk env is not hard to use. I mean, I have taught Smalltalk to old COBOL programmers in literally hours - and had them go bananas of joy. |
10:57:10 | Araq | https://www.youtube.com/watch?v=O6h9_Xx-nLA |
10:57:11 | skrylar | meh.. i don't feel like writing a nim compiler right now |
10:58:03 | gokr | floppydh: Smalltalk has been a secret weapon for building very, very advanced systems in a range of areas, fintech for example. There are reasons for that. |
10:58:31 | skrylar | i thought financial engineers liked it because of soft upgrades. which beamvm also has |
10:58:32 | Araq | yeah, there are also reasons people write game engines in C++. |
10:58:35 | floppydh | gokr: if we go by popularity I don't think we come to reasonable conclusions |
10:58:50 | skrylar | Naughty Dog livecodes, there's a few whitepapers. Uncharted is one example |
10:58:51 | * | sleepyqt joined #nim |
10:58:54 | gokr | floppydh: I didn't mean popularity, Smalltalk is not popular anymore. |
10:58:59 | skrylar | They have some custom rig in racket scheme |
10:59:18 | skrylar | But that kind of livecode requires, basically, two runtimes |
10:59:20 | floppydh | skrylar: I've seen one or two talks about Naughty Dog doing racket, seemed interesting |
10:59:59 | gokr | floppydh: What I mean is that an interactive dev environment which is written in itself and that you can extend with your own tooling - and unlimited meta capabilities (obviously) - is a very powerful tool for building advanced models. But as I said, it's hard to explain it all here on IRC: |
11:00:09 | * | couven92 joined #nim |
11:00:12 | floppydh | gokr: I don't know smalltack and I'm not attacking it, I think most of newer stuff is better then the status-quo (C/Java) |
11:00:34 | floppydh | gokr: oh yes I get that |
11:00:57 | gokr | floppydh: I just wish the Nim community could have a higher aim in this area. |
11:01:18 | Araq | yeah and you know perfectly well that's not how open source works |
11:01:20 | floppydh | gokr: I just personally have a bit of an issue with that because if I can'se use VIM then I feel like I'm separated from my SO |
11:01:35 | * | SenasOzys_ quit (Ping timeout: 240 seconds) |
11:01:56 | skrylar | well the way SLIME works in emacs is you edit a lisp file and have hotkeys that shove your current lisp form over a tcp socket to the runtime |
11:02:04 | FromGitter | <mratsim> I don't agree with data scientists not leaving Python, most companies using Python for data science are looking into Numba (compile Python JIT with Numpy support), Cython (the bastard child of C and Python), plain C for multithreading because while Python is great for prototyping, it's too slow. |
11:02:17 | floppydh | skrylar: I wish I had more time for emacs ... |
11:02:23 | skrylar | I suspect similar things would be done in vim? |
11:02:31 | Araq | mratsim: no, you got that wrong ;-) |
11:02:44 | floppydh | skrylar: you just pipe buffers or files to things in shell |
11:02:48 | * | couven92 quit (Client Quit) |
11:02:49 | Araq | they are not using Smalltalk because they don't know it |
11:03:00 | skrylar | Smalltalk is not attractive in 2017 |
11:03:01 | Araq | and speed is never an issue for anybody anyway |
11:03:05 | Araq | ;-) |
11:03:10 | floppydh | skrylar: in a vim buffer with nim code you can literally just type: `!nim c -r %` |
11:03:18 | skrylar | Pharo/Squeak are awkward to deploy, and Gemstone costs big monies iirc |
11:04:06 | gokr | Well, awkward to deploy... I dunno, it's VM langs, just like any. But yes, Gemstone is big money. |
11:04:16 | skrylar | I looked in to using Seaside once and it would require some strange configs to ex. nginx doing hashed distribution because seaside kept a lot of state, and the nature of multiple containers negated the advantage of updating on the fly |
11:04:48 | skrylar | Calling out to C is also a major pain |
11:05:01 | * | couven92 joined #nim |
11:05:06 | Araq | gokr: you know it doesn't work to tell others what to do. ;-) You need to do it yourself or it ain't gonna happen. |
11:05:24 | FromGitter | <mratsim> @araq I replied regarding epoch based GC/not GC, I'm not advocating it but when I stumbled upon it I was really curious about its concurrency potential. |
11:05:33 | skrylar | Araq, i think he just wishes more people cared |
11:05:36 | gokr | Araq: Yes, I know, but... if there is zero interest... |
11:05:40 | skrylar | I mean nim is an outlier for even having macros |
11:05:42 | gokr | skrylar: Exactly. |
11:06:32 | gokr | Nim - or perhaps it's you Andreas - has at least a sense of the power of meta programming. Extending that even further seems quite natural. |
11:06:41 | floppydh | people should instead care more about Nim if you ask me |
11:06:50 | Araq | plus we have a technology stack that's actually not helping at all ;-) |
11:06:51 | floppydh | :3 |
11:06:57 | gokr | floppydh: What does that mean? |
11:07:04 | Araq | so ... contribute to nlvm |
11:07:10 | Araq | enable its JIT |
11:07:25 | floppydh | gokr: there's limited caring in the world, Nim could profit from more people |
11:07:41 | Araq | give Nim a REPL, it's a good first step |
11:07:42 | FromGitter | <alehander42> gokr: I think most people realize the pro-s of smalltalk-like env-s and the cool stuff about it, but it's just not a priority for nim |
11:07:55 | Araq | but |
11:07:57 | skrylar | i did some ghetto tensor code in nim a while back. that was neat |
11:08:04 | gokr | floppydh: Not sure what you mean, I am here, I care a lot about Nim. |
11:08:14 | dom96 | Pretty sure Naughty Dog only used Lisp for their old games, no? |
11:08:21 | skrylar | dom96, they use racket now |
11:08:38 | Araq | do not introduce your own simple bytecode interpreter that doesn't play well with native code :P |
11:08:40 | floppydh | gokr: oh that's not what I was suggesting, just saying, there's only so much time and effort people have, issue with FOSS in some way is the separation of efforts right |
11:08:47 | skrylar | there was a dark era where Sony mandated all C++ no exceptions, development sucked ass, they let them go back to their own thing, so they use Dr Racket and such to build their thing |
11:08:49 | dom96 | https://www.quora.com/Does-Naughty-Dog-still-use-lisp-for-making-games/answer/Marshall-Robin |
11:08:51 | FromGitter | <alehander42> I actually took a look at nlvm yesterday and it seems promising, does the creator come in this room from time to time? |
11:09:03 | dom96 | Maybe that's already outdated |
11:09:08 | dom96 | Did they switch back to Racket? |
11:09:12 | FromGitter | <alehander42> (I wanted to ask him some stuff before eventually trying to work on it) |
11:09:14 | Araq | alehandler42: yes |
11:09:27 | FromGitter | <mratsim> Ask @krux02 |
11:09:29 | Araq | it's arnetheduck I think |
11:09:38 | Araq | (hope I remember correctly!) |
11:09:39 | skrylar | dom96, sony forced them off of lisp. they went back to it when they could, but racket is cheaper than allegro |
11:09:43 | floppydh | dom96: no that sounds reasonable, they always only used it as some form of codegen/data-generation or so |
11:09:52 | dom96 | interesting |
11:10:04 | dom96 | https://www.youtube.com/watch?v=oSmqbnhHp1c |
11:10:37 | skrylar | dom96, http://con.racket-lang.org/2013/danl-slides.pdf |
11:10:54 | FromGitter | <mratsim> @skrylar ghetto tensor code? |
11:10:55 | skrylar | ND never used "lisp" per se. They used lisp to make a domain specific lisp |
11:11:14 | skrylar | The playstation ran assembly. They just wrote macros to replace S-exps with that assembly |
11:11:31 | FromGitter | <alehander42> araq: thanks, I'll write him if I hit a roadblock |
11:11:37 | floppydh | the original devs had some background in it or so tho? - I think its in the talk |
11:11:51 | * | SenasOzys_ joined #nim |
11:12:02 | FromGitter | <mratsim> What was the quote, "every advanced language progress to a subset of LISP eventually?" or something? |
11:12:03 | dom96 | Seems like they'd be much happier with Nim ;) |
11:12:04 | gokr | skrylar: Where is your ftlk wrapper? |
11:12:11 | skrylar | gokr, is not done yet |
11:12:21 | floppydh | dom96: where's my parser generator? :P |
11:12:27 | skrylar | will be on github soonish, nimble after |
11:12:52 | dom96 | floppydh: parseutils not good enough? :P |
11:13:24 | floppydh | dom96: wasn't even aware :P |
11:13:48 | dom96 | there is also strscans |
11:14:20 | skrylar | there was also a request for toml, and i had some almost finished bson code that hasn't been touched in a month ._. |
11:14:49 | skrylar | though the bson was mostly because i just need a format to store neural networks in |
11:15:36 | * | skrylar has simple torch-esque networks in nim working |
11:16:11 | FromGitter | <mratsim> Is it on GitHub? |
11:16:15 | skrylar | no |
11:16:45 | FromGitter | <mratsim> :/ |
11:17:04 | skrylar | I have ADAM backpropagation, and a partial implementation of Learning To Learn By Gradient Descent by Gradient Descent, but GRU layers are currently broken |
11:17:23 | FromGitter | <mratsim> Well on my side I dealt with my Nvidia issues and can probably bring CuDNN based convolution today or tomorrow |
11:17:29 | Araq | do you also have enough EVE? |
11:17:39 | skrylar | you joke but that's a real thing |
11:17:40 | Araq | sorry, bad joke |
11:17:48 | Araq | what? |
11:18:05 | FromGitter | <mratsim> Adam is a neural network optimization technique |
11:18:33 | skrylar | Araq, mratsim: EVE is the name of a genetic fuzzy tree based AI trainer developed by a defense contractor, it was used to create ALPHA |
11:18:53 | skrylar | Thomson, Iain, ‘You Can Be My Wingman Any Time! RaspBerry Pi AI Waxes Air Force Top Gun’s Tail in Dogfights’, The Register, 28 June 2016 <http://www.theregister.co.uk/2016/06/28/alpha_ai_waxes_air_force_top_guns_tail_in_dogfights/> [accessed 31 July 2016] |
11:19:22 | Araq | you and your shiney new NN algorithms, what happened to good old Support Vector Machines |
11:19:29 | skrylar | hey i looked in to those last week |
11:19:47 | Araq | they never led me down and they used to be much faster to train |
11:20:13 | skrylar | they're on my radar but i haven't done any AI work in two weeks other than fixing a bug |
11:20:25 | FromGitter | <mratsim> Svm don't scale to millions of data points and it's very hard (impossible ?) To parallelize state of the art non-linear SVM |
11:20:32 | skrylar | i have some weird stuff in an old C# file for "instantaneously trained neural networks" |
11:20:42 | skrylar | mratsim: you don't need millions of data points |
11:20:48 | skrylar | you need only exemplary data points |
11:21:46 | skrylar | IIRC the way to handle SVMs is to select a subset which have the most distinctive features, then train on those. |
11:21:54 | skrylar | you can use a large chain of small SVMs |
11:22:37 | Araq | how do I know the subset which have the most distinctive features? |
11:22:51 | Araq | isn't that a problem that is as hard to solve? |
11:22:55 | FromGitter | <mratsim> With Principal component analysis I guess |
11:23:17 | FromGitter | <mratsim> It captures what gives the most variance |
11:23:19 | skrylar | or NNs |
11:23:37 | skrylar | some people still chain NNs as feature extractors and then pipe those to SVMs |
11:24:08 | skrylar | you can also do stuff like k-means clustering on feature vectors |
11:24:27 | FromGitter | <mratsim> In my case I mostly use Logistic regression, gradient boosted trees and NN. |
11:24:45 | skrylar | Yeah. Import AI posted a survey recently showing data scientists don't actually use the crazy shit |
11:25:15 | gokr | skrylar: Just curious, did you kinda dismiss all the other options when going for FLTK or did you have other reasons to pursue it? |
11:25:26 | skrylar | gokr, well i answered that already |
11:25:31 | skrylar | It pissed me off the least. |
11:25:51 | gokr | ok, got it. |
11:26:04 | skrylar | I wrote the same application in Fltk, wxWidgets, FreePascal/LCL, and Vala/GTK |
11:26:15 | FromGitter | <mratsim> In any case if you have suggestions to improve Arraymancer @skrylar you're welcome. |
11:26:26 | skrylar | The Fltk one was the only implementation that didn't require mental help just getting sliders to work |
11:26:36 | dom96 | Isn't Fltk rather bleh-looking? |
11:26:38 | gokr | It's indeed interesting that it still is a potent option - and I presume it has to do with the fact that it is a bit "inbetween", right? |
11:26:41 | skrylar | dom96, can be |
11:26:56 | skrylar | gokr, well nothing is wrong with it other than its not pretty? |
11:27:05 | skrylar | Nuke only stopped using it because of politics in The Foundry |
11:27:18 | skrylar | it saw use in the VFX industrys hidden secret stuff for years |
11:28:28 | skrylar | they were going to release fltk2 as some big refactor, so people held off while waiting, then the refactor never hit, so a lot of people fizzled out. |
11:28:34 | skrylar | its the same thing that killed D |
11:28:52 | skrylar | well, similar |
11:29:07 | Araq | its the same thing that holds Nim back... the endless struggle for "perfection" |
11:30:05 | skrylar | Fltk just uses straight callbacks |
11:30:11 | skrylar | No STL, no template heirarchy bullshit |
11:31:51 | skrylar | If someone really wanted to, one could probably incrementally port widgets to native nim. Go from the deep parts of the tree, work back, fall back to the wrapper for unfinished parts. |
11:33:56 | skrylar | theres only absolute layouts in fltk, but this is fine because we can overlay generic layout stuff on it. like miglayout |
11:34:05 | skrylar | (or css flex boxes if you're masochistic) |
11:35:07 | skrylar | Qt/Wx/Gtk/etc have some built in layout code. But its only for use by premade stuff. If you need to draw your own anything, you get no help from the toolkit. While using a generic one can do both. So it sounds better IMO |
11:35:46 | arnetheduck | alehander42, he's here now ;) |
11:35:57 | gokr | Although WIPs, did you look at: https://github.com/PMunch/genui and https://github.com/trustable-code/NiGui |
11:37:16 | skrylar | gokr, barely |
11:37:20 | skrylar | isn't nigui unfinished? |
11:37:24 | FromGitter | <alehander42> oh hey arnetheduck |
11:37:33 | FromGitter | <Yardanico> skrylar: nooo |
11:37:36 | gokr | Both are, but... just wondering what your thoughts are |
11:37:37 | FromGitter | <Yardanico> it has only simplest widgets |
11:37:53 | FromGitter | <Yardanico> (I'm about NiGui) |
11:38:08 | gokr | "NiGui is currently work in progress. Very basic things work, many things are missing." |
11:38:26 | FromGitter | <alehander42> basically I still haven't had the chance to get more familiar with the nlvm source, but I wondered if there are any specific issues/stuff that you'd like help with |
11:38:28 | floppydh | API so far seems comfortable tho, for NiGui |
11:38:44 | FromGitter | <Yardanico> yes it is |
11:38:46 | skrylar | gokr, well i used fltk in the past, it works just fine, its everywhere (debian stable!) and its brainless to wrap |
11:38:54 | FromGitter | <Yardanico> but for example it doesn't have sliders at all :P |
11:39:01 | gokr | skrylar: Yeah, I appreciate that. |
11:39:06 | skrylar | i looked at dealing with gtk3 for elementaryos stuff, but there were a LOT of prereqs |
11:39:17 | skrylar | and frankly the gtk3 developers are morons anyway |
11:39:28 | floppydh | skrylar: nobody likes them :/ |
11:39:53 | floppydh | probably too few |
11:39:58 | skrylar | floppydh, because cocoa is lovely and simple, while gtk3 is land of the 100 line boilerplate for buttons |
11:40:05 | skrylar | and its super inefficient |
11:40:38 | floppydh | skrylar: no experience, I knew gtk3 mostly from being unreasonably bothersome to customize |
11:40:46 | floppydh | skrylar: not from the API |
11:40:46 | skrylar | around a year ago i asked what the best layout engine was |
11:41:16 | gokr | skrylar: Are you c2nimming it? |
11:41:22 | skrylar | gokr, hand |
11:41:25 | floppydh | and not because I tried to, couldnt care less, but quite some Linux applications jumped from gtk2->gtk3->qt |
11:41:31 | skrylar | with some elisp to ease the pain |
11:41:36 | gokr | Hehe |
11:41:48 | skrylar | floppydh, because of huge bugs and inefficiency |
11:42:04 | skrylar | porting gtk2 to gtk3 is like that thing i mentioned earlier where your app goes from 5mb use to 20mb |
11:42:08 | gokr | skrylar: Btw, I am trying to get Nicolas Petton into Nim, no success yet. |
11:42:10 | skrylar | and you gained nothing |
11:42:23 | skrylar | gokr, who is that? |
11:42:35 | PMunch | Gtk isn't that hard to use |
11:42:36 | gokr | He is ... one of the emacs maintainers |
11:42:39 | PMunch | But not the best either |
11:42:44 | FromGitter | <alehander42> arnetheduck: e.g. making more upstream tests pass, look for ways to use more of the stdlib, JIT support |
11:42:46 | gokr | He also did emacs new homepage |
11:42:48 | PMunch | Hopefully genui will be better :) |
11:43:06 | skrylar | anyway when i looked, this had the best reviews on stackoverflow et all: http://www.miglayout.com/QuickStart.pdf |
11:43:07 | PMunch | Just have to figure out how to do these custom widgets so I can make some more progress |
11:43:44 | gokr | skrylar: He also does the emacs releases and is responsible for a bunch of emacs packages. |
11:44:06 | skrylar | sounds like a busy man |
11:44:08 | gokr | IMHO he could do wonders here. |
11:44:16 | skrylar | i've been wrapped up in studying art for work :\ |
11:44:23 | gokr | oh, cool. |
11:44:24 | skrylar | might be able to do 3d painting in nim |
11:44:37 | gokr | Where do you live? |
11:44:42 | skrylar | TX, USA |
11:44:54 | gokr | Oh... early over there right? |
11:45:01 | skrylar | lmost 6am |
11:45:11 | gokr | Are you pulling an allnighter? ;) |
11:45:31 | skrylar | no idea when i'm going to sleep =p |
11:45:33 | floppydh | skrylar: how's Red ? |
11:45:34 | arnetheduck | alehander42, tests are an excellent place to start - some failures are expected because of nims reliance on c, but many are bugs in nlvm or changes in upstream that haven't gotten ported yet |
11:45:40 | skrylar | trying to finish this wrapper to do more interesting things |
11:45:42 | gokr | Cool to have you back here, always fun to hear that people come back to Nim - especially from Red. |
11:45:55 | arnetheduck | if you're on anything other than linux, platform support would be high on the list too |
11:46:14 | skrylar | floppydh, the parts that work are fun. |
11:46:33 | skrylar | Parse is the only parser generator that doesn't give me anneurisms |
11:46:33 | floppydh | skrylar: planning to do more of it? |
11:46:42 | * | vlad1777d quit (Ping timeout: 260 seconds) |
11:47:12 | skrylar | a big part of red is using their built-in PEG generator to create dialects, and then using those dialects on problems |
11:47:16 | gokr | skrylar: Parse! Cool you mentioned it. Have you seen PetitParser? |
11:47:23 | skrylar | gokr, no |
11:47:32 | skrylar | i know he's allowing lisplike macros and parse at compile time in red |
11:47:44 | skrylar | but then they spent time working on libred instead of, you know, important shit |
11:47:51 | arnetheduck | JIT, not so important right now, nlvm uses the nim vm for now just like the c backend which works fine - once the bugs are ironed out, it can of course be scrapped and replaced by llvm of course |
11:47:54 | FromGitter | <alehander42> arnetheduck: ok, sounds good (I use mostly linux but I can test stuff on windows too) |
11:48:10 | skrylar | "You can embed us in Excel!" "Can I write a 3d paint tool?" "Well no we're missing the GC and all the production bits." "... but i can hello world in Excel!" |
11:48:12 | gokr | "PetitParser combines ideas from scannerless parsing, parser combinators, parsing expression grammars and packrat parsers to model grammars and parsers as objects that can be reconfigured dynamically." |
11:48:15 | * | skrylar facedesks |
11:48:35 | gokr | skrylar: PetitParser is the nicest I have ever used. Born in Smalltalk, but ported to various langs. |
11:48:38 | FromGitter | <alehander42> arnetheduck: I'd probably start trying to do stuff after this week , if I have any questions, should I write you here? or open an issue? |
11:48:50 | arnetheduck | of the lowest hanging fruit, the nlvm main() could use a friendly pass as well, it's quite.. minimal |
11:49:21 | skrylar | well the plus of Parse is that its very freeform. Nim macros require you to either obey nim syntax (which is generous) or abuse its interpretation of things (i have done it, but you get strangeness like ghetto procs not having semicolon/comma invariance like real procs do) |
11:49:35 | skrylar | whereas parse lets you make arbitrary grammer with a lot of token types |
11:49:47 | arnetheduck | once you've warmed up, it would be cool to switch to dwarf exceptions, setjmp really sucks |
11:49:52 | gokr | skrylar: http://scg.unibe.ch/research/helvetia/petitparser |
11:49:57 | gokr | (slides there are quite nice) |
11:50:27 | gokr | "ghetto procs" - quote of the day |
11:50:47 | skrylar | gokr, i have an unfinished RPC generator macro |
11:50:57 | arnetheduck | I'm here around this time usually - issues are great if you want to discuss ideas |
11:51:29 | gokr | arnetheduck: Go, go guys! |
11:51:38 | Araq | arnetheduck: you probably missed it but IMO nlvm should add some "real value" and then I am even willing to make it part of Nim's core |
11:51:50 | Araq | by "real value" I mean something out of |
11:51:56 | Araq | - better debugger support |
11:52:02 | Araq | - JIT/REPL support |
11:52:17 | Araq | - better/precise GC |
11:52:18 | skrylar | gokr, eh if i find it again i'll toss a link to a gist; one was for doing RPC code, another was for finite state machines. |
11:52:43 | FromGitter | <mratsim> emscripten support :P |
11:52:44 | Araq | as it's now it's just instead of producing C code it produces LLVM bitcode (correct me if I'm wrong) |
11:52:50 | skrylar | gokr, https://gist.github.com/Skrylar/fae89168d08e1351c21942917922fbfa an example of ghetto procs |
11:52:52 | gokr | skrylar: As you probably know it was me rediscovering Rebol that kicked me into creating Spry. |
11:53:17 | gokr | skrylar: So it's an "unholy" mix of Rebol and Smalltalk currently ;) |
11:53:30 | skrylar | rebol is basically a lisp tho :) |
11:53:34 | gokr | skrylar: For example, the idea of "words" |
11:53:48 | skrylar | rebol/red is almost impossible to tool though |
11:54:08 | skrylar | there is basically zero way to know what any word means without evaluating it :/ |
11:54:27 | gokr | sure, but... that's code organisation issues, right |
11:54:45 | skrylar | well it complicates many things |
11:55:00 | skrylar | foo 1 2 bar baz ; which ones are functions and parameters? |
11:55:32 | gokr | yeah, I agree. The free form is a bit "too much". |
11:55:43 | gokr | In Spry I am opting for more Smalltalkish syntax. |
11:55:59 | gokr | I made a 2 min silly movie btw, using libui and live coding: http://krampe.se/spry-ide.mp4 |
11:56:05 | skrylar | I have no idea if i would support aping Redbol. I mean |
11:56:12 | skrylar | There's that one company that sells SCADA systems running on Rebol |
11:56:18 | skrylar | They said it was amazing |
11:56:27 | gokr | I am not aping Rebol, I just... got inspired by some ideas. |
11:56:35 | arnetheduck | Araq, gdb support is there now |
11:56:45 | gokr | And I am gradually sliding away I think - towards more Smalltalkish syntax. |
11:56:56 | skrylar | gokr, depends what you want really |
11:56:59 | arnetheduck | jit / repl would be easy to add but there are too many bugs still |
11:57:13 | skrylar | ST-80 syntax is great in a sense that you can train children to understand it, which was Alan's goal all along |
11:57:16 | gokr | skrylar: The movie shows me adding buttons in the "IDE" dynamically btw, kinda fun. |
11:57:19 | FromGitter | <Yardanico> arnetheduck: well Araq means "better debugging than in Nim with C backend" is it already the case? |
11:57:21 | arnetheduck | exceptions are high on the list because of the mess they cause, after that, gc would be interesting indeed |
11:57:34 | skrylar | Rebol syntax is great in that metaprogramming is fully natural in appearance with other code |
11:57:42 | FromGitter | <alehander42> arnetheduck: ok, dwarf exceptions would be nice indeed! otherwise I am also motivated partly because of eventual jit/repl support |
11:57:52 | gokr | skrylar: I am trying to catch "both" aspects. |
11:57:58 | FromGitter | <Yardanico> hooray https://github.com/nim-lang/packages/pull/613 |
11:58:11 | gokr | Both the lisp homoiconicism - and the Smalltalk "more readable" syntax. |
11:58:19 | skrylar | You can't have both |
11:58:29 | skrylar | homoiconicism tends to nuke the naive readability |
11:58:53 | skrylar | fortunately there is no "natural" representation of code. you can teach noncoders that homoiconicity IS correct, and if their minds are not ruined by BASIC and C, they won't know it isn't |
11:59:20 | gokr | skrylar: Here is a silly text editor example: https://github.com/gokr/spry/blob/master/samples/editor/editor.sy |
11:59:33 | arnetheduck | Yardanico, not sure at what level nim-c is, but with nlvm you get to step through the .nim code and gdb can walk types etc |
11:59:35 | skrylar | whether (foo 'bar), foo 'bar, or foo(bar) is natural, is purely anchoring effect :) |
12:00:09 | gokr | Spry is currently an "unholy mix" - so it has both prefix words style, and Smalltalk keyword style - which ... yes, gets confusing. I am slowly leaning towards perhaps going even more into Smalltalk direction, not sure. |
12:00:36 | skrylar | well. i like st-80. but everyone complains how verbose it is |
12:01:00 | arnetheduck | there's still some work to do to make it smarter about strings (gdb plugin likely), but it looks pretty natural actually.. I've used it in eclipse for example to step through code |
12:01:03 | gokr | I like it too - but in Spry I try to make some things better. Like better "literal syntax" for Dictionaries etc. |
12:01:38 | gokr | skrylar: I presume you saw my site: http://www.sprylang.org |
12:01:50 | skrylar | gokr, also important is that st-80 was always intended to be written by, basically, a SCID system |
12:01:56 | skrylar | (Source Code In Database) |
12:02:00 | arnetheduck | alehander42, I'd say exceptions and getting rid of crashes would almost be prereq's for reasonable repl support.. later, gc will help as well, llvm5 has been making some strides in that area |
12:02:09 | PMunch | Hmm, given a stream what's the best way to read the common "BYTE size, BYTE[size] data" pattern |
12:02:14 | gokr | skrylar: I would not use exactly those words though. |
12:02:24 | PMunch | Reading the size byte is easy enough, but what's the best way to read the rest of the data? |
12:02:28 | gokr | Smalltalk doesn't have a "database of source code". |
12:02:33 | * | Snircle joined #nim |
12:02:33 | gokr | (most don't) |
12:02:47 | skrylar | they have the class browser. to a user, close enough |
12:02:58 | gokr | Yeah, sure. And that I love :) |
12:03:16 | gokr | But nothing prevents also having a reasonable file layout. |
12:03:21 | gokr | If one wishes. |
12:03:21 | * | vlad1777d joined #nim |
12:03:49 | skrylar | Pipe dreams of Ecco Pro clones with ST-80 scripting |
12:04:03 | gokr | But I shouldn't not hog about spry, I am on #sprylang for that |
12:04:30 | gokr | (but to all of you not knowing - Spry is written in Nim, so it's at least very related) |
12:04:46 | skrylar | one thing i haven't figured out how to do yet in nim, is efficiently plot lines through a projection filter |
12:05:09 | skrylar | though it probably can't be, so .. meh |
12:05:33 | * | federico3 quit (Quit: WeeChat 1.9) |
12:05:41 | * | federico3 joined #nim |
12:06:18 | FromGitter | <mratsim> So apparently Google needs to manipulate AST of functions in Python: https://github.com/google/tangent#automatic-differentiation, SOmeone should pitch Nim to them ;) |
12:06:35 | skrylar | tensorflow stuff? |
12:09:53 | FromGitter | <alehander42> arnetheduck: of course, repl support is my distant goal |
12:10:08 | FromGitter | <alehander42> nlvm uses llvm4 currently, right? |
12:11:07 | * | xkapastel quit (Quit: Connection closed for inactivity) |
12:13:54 | Araq | alehander42: distinct goals are fine but I'm really curious what it takes |
12:16:34 | Araq | *distant lol |
12:17:51 | arnetheduck | alehander42, yeah.. feel free to upgrade |
12:21:47 | FromGitter | <alehander42> well distant as in "I'll try to play with the idea as soon as I know the nlvm codebase well enough, but I realize that there are more pressing issues for nlvm itself in order to be reliable" :D |
12:23:07 | Araq | "here is a new LLVM backend that passes 100% of Nim's test suite" "ok ... yay?" |
12:23:36 | Araq | "here is a new slightly broken LLVM backend that gives Nim a REPL" "wow, I'm gonna play with that one!" |
12:24:04 | Araq | but hey, just my opinion ;-) |
12:25:35 | FromGitter | <alehander42> of course, I don't think 100% is the goal, but arnetheduck said "exceptions and getting rid of crashes would almost be prereq's for reasonable repl support." |
12:26:41 | FromGitter | <alehander42> so I assume nlvm might need a bit more stability (not 100% tests) to be not too fragile |
12:28:03 | FromGitter | <alehander42> (but I am going to try a repl anyway sooner than later , maybe "parallel goals" is a better wording) |
12:33:26 | arnetheduck | exceptions because setjmp will do funny things and crashes.. well, it's kind of annoying if you're building up a repl case and lose it in the middle |
12:35:27 | arnetheduck | is a spec for the language part of the 1.0 plans? |
12:35:35 | arnetheduck | Araq? |
12:38:16 | * | Senketsu_ joined #nim |
12:42:26 | * | Senketsu_ quit (Client Quit) |
12:43:08 | PMunch | https://www.reddit.com/r/nim/comments/7b8qqz/using_case_in_object_definition/ |
12:43:14 | PMunch | Did you guys see this ^? |
12:43:26 | PMunch | This feature really should be better documented |
12:43:42 | PMunch | Or if it is better documented somewhere it should be put in a place where it's easier to find.. |
12:45:14 | * | dddddd joined #nim |
12:49:49 | dom96 | which feature? |
12:49:52 | dom96 | object variants? |
12:50:45 | * | Snircle quit (Read error: Connection reset by peer) |
12:51:37 | * | Snircle joined #nim |
12:52:43 | FromGitter | <mratsim> ranges too |
12:53:03 | FromGitter | <mratsim> the case of syntax mostly |
12:56:42 | FromGitter | <alehander42> I really like patty's variant and matching dsl-s btw, does somebody use this library? |
12:59:07 | * | sleepyqt quit (Ping timeout: 250 seconds) |
13:19:03 | FromGitter | <mratsim> What are dwarf exceptions btw? (Please don't answer, the hobgoblins of mind) |
13:23:58 | elrood | the answer isn't that far from it though, it's the debugging format developed for elf objects |
13:25:31 | elrood | see http://dwarfstd.org/ it and its exception handling mechanism has been adopted for other binary object formats since |
13:26:19 | FromGitter | <mratsim> Thanks |
13:27:32 | Araq | arnetheduck: no way, a spec is more work than a compiler that works reasonably well :-) |
13:28:34 | Araq | I'm willing to evolve the manual into a spec of course, but it's really much effort |
13:31:17 | elrood | mratsim: actually the way exceptions are handled isn't really part of the dwarf standard, but related closely enough to be called dwarf exception handling |
13:34:08 | FromGitter | <alehander42> @Araq so basically the current compiler will be the reference impl ? |
13:36:04 | * | yglukhov quit (Remote host closed the connection) |
13:36:10 | arnetheduck | with a spec, I would likely dump the current compiler, reimplement the vm using llvm, redo the compiler as an independent lib.. after those little details, the repl would be a piece of cake ;) |
13:37:29 | dom96 | why do you need a spec for that? Implement 80% of Nim and then adjust to the reference compiler for the remaining 20% :) |
13:37:35 | * | yglukhov joined #nim |
13:41:09 | Araq | alehander42: it IS the reference implementation and a "clear spec that is not a clusterfuck to re-implement independently" is a worthy v2.0 goal |
13:43:43 | Araq | arnetheduck: how do you handle the case where we have to move things into structs in your debugging support? |
13:44:10 | Araq | every var in a closure (iterator) ends up in a struct, not in a local scope |
13:48:19 | * | Senketsu_ joined #nim |
13:48:30 | PMunch | Hmm, is there a library to do sha hashes in Nim? |
13:49:25 | arnetheduck | technically it should "just work" in the scope of the closure (ie while it's running).. if you assign the closure to a var, it might not however because I don't do gdb-compatible vtables yet, as far as I know.. didn't dig too far into it however |
13:50:11 | FromGitter | <Yardanico> PMunch: yep |
13:50:26 | FromGitter | <Yardanico> there's this: https://github.com/jangko/nimSHA2 |
13:50:27 | * | skrylar quit (Remote host closed the connection) |
13:50:51 | FromGitter | <Yardanico> well it's sha 2 |
13:50:59 | PMunch | Yeah I just found that :P |
13:51:20 | PMunch | I was searching for "nim sha256", when I searched for "nim sha" I found it instantly :P |
13:52:50 | Araq | arnetheduck: it can't work if you do use 'transf.nim' ;-) |
13:53:11 | * | JappleAck joined #nim |
13:53:13 | Araq | your codegen likely isn't even aware the object comes from a transformation and not from Nim code |
13:53:40 | arnetheduck | oh. so you're saying you don't actually generate a nim ptype for it? |
13:54:17 | Araq | I do, but var x = 4 becomes environment->x03 = 4 |
13:54:33 | Araq | and you need to show 'x' in the debugger :P |
13:54:52 | Araq | comes up for async code all the time |
13:55:24 | arnetheduck | likely, I show environment, and you can drill into it to get x.. |
13:55:40 | arnetheduck | got an easy test case somewhere? test suite maybe? I can give it a try |
13:56:11 | dom96 | Anybody have access to high CPU core count servers that I could use for some benchmarks? :) |
13:58:05 | arnetheduck | dom96, a spec would be used to tell features from bugs - impossible with the current compiler ;) |
13:58:42 | dom96 | arnetheduck: true :) |
14:03:14 | Araq | arnetheduck: oh that's actually rather simple, we don't make mistakes unless the compiler crashes. |
14:03:26 | Araq | so a crash is a bug, no crash is a feature |
14:03:33 | Araq | simple. |
14:04:23 | Araq | we turn bugs into features via if x.isNil: localError(n.info, "not supported") |
14:05:01 | arnetheduck | alehander42, oh and while you're at it, there's always thread and tls support as well - technically part of fixing the test suite ;) |
14:05:26 | * | Senketsu_ quit (Remote host closed the connection) |
14:06:06 | arnetheduck | Araq, ooh. then I have a few things I'd like patched ;) |
14:06:42 | * | endragor quit (Remote host closed the connection) |
14:06:58 | arnetheduck | start with the refcounting gc and the horrible origin tracking mess that the compiler tries to do with onstack, onunknown and so on |
14:07:35 | dom96 | :O |
14:20:39 | Araq | horrible? :-) |
14:21:17 | Araq | recently we got AST node support in the TLoc object so you can just recompute the location |
14:21:34 | Araq | I would advice you to do just that in nlvm |
14:27:22 | * | NimBot joined #nim |
14:43:15 | arnetheduck | nlvm gdb closures: https://gist.github.com/arnetheduck/48d8cfab5eb8d579d0d901d3e0f48b6d |
14:54:41 | * | gokr quit (Ping timeout: 240 seconds) |
14:59:22 | arnetheduck | Araq, TLoc is a bit hard to use in nlvm, it's geared towards text-outputting backends with its rope member.. |
15:00:25 | Araq | what do you use instead? |
15:00:46 | * | nsf quit (Quit: WeeChat 1.9.1) |
15:05:39 | * | couven92 quit (Quit: Client disconnecting) |
15:08:52 | * | smt joined #nim |
15:29:38 | * | rauss joined #nim |
15:31:50 | * | PMunch quit (Quit: Leaving) |
15:56:35 | * | nsf joined #nim |
16:08:49 | * | smt` joined #nim |
16:12:36 | * | smt quit (Ping timeout: 268 seconds) |
16:14:27 | * | arnetheduck quit (Ping timeout: 268 seconds) |
16:16:03 | * | smt joined #nim |
16:18:39 | * | smt` quit (Ping timeout: 248 seconds) |
16:20:13 | * | TjYoco joined #nim |
16:21:53 | * | smt` joined #nim |
16:23:05 | * | livcd quit (Remote host closed the connection) |
16:24:57 | * | vlad1777d quit (Ping timeout: 250 seconds) |
16:25:10 | * | smt quit (Ping timeout: 258 seconds) |
16:25:27 | FromGitter | <Yardanico> Araq: offtopic, about StarCraft2: do you know it's going F2P on 14th of November? :) e.g. you'll be able to play first campaing for free + free multiplayer (including ranked matches) |
16:25:42 | FromGitter | <Yardanico> and also co-op missions :P |
16:27:34 | FromGitter | <Yardanico> well maybe you're interested :D |
16:28:15 | * | vlad1777d joined #nim |
16:28:44 | * | floppydh quit (Quit: WeeChat 1.9.1) |
16:32:45 | * | vlad1777d quit (Ping timeout: 250 seconds) |
16:33:15 | * | vlad1777d joined #nim |
16:53:18 | * | miran joined #nim |
16:54:28 | * | yglukhov quit (Remote host closed the connection) |
16:58:28 | * | yglukhov joined #nim |
17:02:10 | * | SenasOzys_ quit (Ping timeout: 264 seconds) |
17:02:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:03:40 | * | SenasOzys_ joined #nim |
17:11:58 | * | Jesin joined #nim |
17:15:35 | * | ryanhowe joined #nim |
17:18:22 | * | ryanhowe quit (Client Quit) |
17:20:25 | dom96 | 17 comments already, whew |
17:20:27 | dom96 | https://github.com/nim-lang/Nim/issues/6700 |
17:22:01 | dom96 | btw treeform, you're right, the docs are wrong. |
17:24:05 | dom96 | Also, yeah, newSocket() vs. new Socket is incredibly subtle :\ |
17:25:59 | * | Vladar quit (Ping timeout: 268 seconds) |
17:26:26 | * | Vladar joined #nim |
17:28:24 | * | gokr joined #nim |
17:28:52 | Araq | yardanico: I'll consider it but I have no time for gaming |
17:29:13 | Araq | but yeah I'm aware it's free to play now, I'm not living under a rock ;-) |
17:35:34 | * | Trustable joined #nim |
17:36:37 | FromGitter | <Gooseus> Araq: @Yardanico you guys should meld the gaming / nim dev by building a SC brood wars AI in nim to compete in some tournaments... if it does well then that should up the visibility and interest from AI people who can then join the community - http://www.starcraftai.com/wiki/Main_Page |
17:37:14 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:39:08 | GitDisc | <GooRoo> I guess in this case it doesn't really matter which language you use |
17:42:35 | * | SenasOzys_ quit (Ping timeout: 240 seconds) |
17:45:36 | * | vivus joined #nim |
17:45:37 | * | smt` quit (Read error: Connection reset by peer) |
17:46:17 | * | smt` joined #nim |
17:52:07 | Araq | gooseus: you can also build an SC2 AI, the created an API for it too |
17:54:10 | * | yglukhov joined #nim |
17:56:37 | dom96 | lol |
17:56:44 | dom96 | you're aware because I told you :P |
17:57:27 | * | gokr quit (Ping timeout: 240 seconds) |
17:59:10 | * | yglukhov quit (Ping timeout: 264 seconds) |
17:59:30 | * | SenasOzys_ joined #nim |
17:59:43 | * | yglukhov joined #nim |
18:03:18 | Araq | dom96: actually I also got an email about that yesterday |
18:03:22 | Araq | :P |
18:05:44 | vivus | is it better to add auto-op or just op for a channel? |
18:07:39 | FromGitter | <Yardanico> manual op is better for dealing with trolls :P |
18:08:43 | dom96 | vivus: freenode guidelines state you should remain without +o until you need it |
18:08:55 | dom96 | it draws attention from trolls |
18:09:07 | vivus | noted |
18:12:52 | dom96 | Going to ask this again. Anybody with a high cpu core count server who would be willing to let me run some benchmarks on it? |
18:13:37 | federico3 | dom96: *cough* |
18:14:26 | dom96 | federico3: You came to mind, but I feel odd about using your hardware when I'm sort of rewriting what you've written :) |
18:15:01 | federico3 | what is it? |
18:15:02 | dom96 | Then again, what I'm writing has grown outside the scope of your PR anyway |
18:15:24 | federico3 | the socket dispatcher? |
18:15:41 | dom96 | The parallisation of asynchttpserver |
18:15:46 | dom96 | *parallelisation |
18:15:56 | dom96 | (if that's even a word :)) |
18:16:05 | federico3 | yep - but now it's more generic than *http* I guess? |
18:16:17 | dom96 | I'm basically writing a custom HTTP server on top of epoll for the greatest performance |
18:17:08 | federico3 | sounds almost orthogonal to my PR |
18:23:22 | federico3 | do you plan to support multiple threads? |
18:23:48 | dom96 | yep |
18:23:59 | * | TjYoco quit (Quit: Leaving) |
18:25:17 | GitDisc | <treeform> Will like a virtual private server work? |
18:25:25 | GitDisc | <treeform> Or do you need one that is real hardware? |
18:26:35 | federico3 | dom96: if you also need a slow - but physical - server, Scaleway have 4-core ARMv7 for 3 euros a month |
18:31:13 | * | grumbly joined #nim |
18:32:38 | grumbly | Hi there. I'm having the PCRE problem (could not import: pcre_free_study), but with the newer pcre v10.30. Has anyone tried 10.30 or have a good guess what I could try? |
18:33:11 | grumbly | I tried to get our sysadmin to install 8.38, but they went to 10.30 instead. |
18:35:22 | dom96 | have you tried compiling with --deadCodeElim:on? |
18:41:53 | grumbly | No luck with compiling my executable with "--deadCodeElim:on", resulting in the same pcre import error. I wonder if there were breaking changes. |
18:42:47 | dom96 | Sadly it seems that the stdlib will need to be patched to fix this :\ |
18:48:24 | grumbly | I just read that pcre10.xx is known as "pcre2" and 8.xx is "pcre1" so yes, probably breaking changes. |
18:49:13 | grumbly | source: https://www.pcre.org/original/changelog.txt |
18:49:43 | grumbly | Thanks for the help. |
18:50:10 | * | grumbly left #nim (#nim) |
18:59:44 | FromGitter | <mratsim> Omg, nimble directory structure, 3 posts in 1 min >_> |
18:59:52 | dom96 | :D |
19:00:04 | federico3 | posts? |
19:00:11 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/6700 |
19:09:56 | dom96 | replied again :) |
19:16:09 | * | SenasOzys_ quit (Quit: Leaving) |
19:16:29 | * | SenasOzys joined #nim |
19:21:38 | Araq | that RFC is tremendously successful XD |
19:40:21 | * | PMunch joined #nim |
19:42:04 | * | miran quit (Quit: Konversation terminated!) |
19:44:27 | * | enthus1ast- quit (Ping timeout: 260 seconds) |
19:55:27 | * | sz0 joined #nim |
20:04:43 | * | Guest2656 quit (Quit: Leaving) |
20:05:06 | * | RPG joined #nim |
20:05:30 | * | RPG is now known as Guest27009 |
20:07:25 | dom96 | lol, apparently bcrypt2 is no longer recommended for hashing passwords https://news.ycombinator.com/item?id=15646743 |
20:07:32 | dom96 | s/2// |
20:24:06 | * | smt_ joined #nim |
20:24:59 | * | smt_ quit (Remote host closed the connection) |
20:25:31 | * | smt_ joined #nim |
20:27:11 | * | smt` quit (Ping timeout: 250 seconds) |
20:29:04 | * | yay joined #nim |
20:36:39 | FromGitter | <Varriount> Araq: Ever considered an OS with an SQL based API, rather than a file based one like *nix? |
20:37:14 | * | gokr joined #nim |
20:39:30 | PMunch | Varriount, huh that would be pretty interesting |
20:39:51 | PMunch | Does anyone know how to print an array of bytes as hex in Nim? |
20:42:13 | PMunch | Currently I'm doing `for c in array: stdout.write(c.toHex)` |
20:42:18 | PMunch | But that feels a bit hacky.. |
20:43:01 | * | smt_ quit (Quit: Leaving) |
20:50:41 | Araq | varriount: yup, but I don't have time to develop an OS |
20:51:05 | FromGitter | <data-man> @PMunch: |
20:51:41 | FromGitter | <data-man> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a021cdd32e080696e7850ed] |
20:52:31 | PMunch | Well yes, obviously that's a solution :P |
20:52:34 | FromGitter | <data-man> Criticism is welcome :) |
20:52:50 | PMunch | PR it to strutils :) |
20:53:36 | federico3 | PMunch https://github.com/nim-lang/Nim/pull/6517 |
20:54:35 | PMunch | Nice :) |
21:08:42 | * | Vladar quit (Quit: Leaving) |
21:09:54 | * | Trustable quit (Remote host closed the connection) |
21:13:18 | PMunch | Huh, this is strange |
21:13:29 | PMunch | I'm trying to implement a Keepass parser in Nim |
21:13:41 | PMunch | And I've run into a really bizare problem |
21:15:01 | PMunch | Given the same key and input after having been run 10000 rounds through AES-ECB the output from Nim and Python is exactly the same for half the output, then they differ.. |
21:15:32 | PMunch | Changing rounds or input obviously makes the entire thing different |
21:16:38 | PMunch | Oh sorry, not 10_000 rounds 100_000 rounds |
21:17:17 | FromGitter | <Varriount> PMunch: Integer overflow? |
21:17:43 | PMunch | In Nim but not in Python? |
21:18:02 | PMunch | The input and outputs are all given as strings, so that would have to be in nimAES |
21:18:12 | PMunch | Err, nimAES2 |
21:18:24 | dom96 | It's likely that there is a bug in that package |
21:18:27 | PMunch | No wait, it's nimSHA2 and nimAES |
21:18:42 | PMunch | But after 100_000 rounds they are almost the same |
21:19:00 | PMunch | I would expect there to be a huge discrepancy if there was a bug.. |
21:20:00 | FromGitter | <Varriount> PMunch: Python uses bigints |
21:24:00 | PMunch | It's just so strange, I would really expect it to be completely different |
21:24:17 | PMunch | What are the odds that after 100_000 rounds the bug was hit exactly once? |
21:25:09 | * | Arrrr quit (Read error: Connection reset by peer) |
21:25:18 | PMunch | Ouch |
21:25:19 | * | SenasOzys quit (Ping timeout: 248 seconds) |
21:25:28 | PMunch | I just output all 100_000 |
21:25:39 | PMunch | 90% of them share the same last half.. |
21:25:53 | * | lurker joined #nim |
21:28:19 | * | nsf quit (Quit: WeeChat 1.9.1) |
21:29:04 | * | elrood quit (Quit: Leaving) |
21:37:13 | PMunch | Aah |
21:37:22 | PMunch | Turns out I'm an idiot.. |
21:37:45 | yay | Araq I wonder if the inability to go to a definition of an import is a limitation of numsuggest? For example, Cmd-MMB click on "threadpool" in "import threadpool" does nothing in the VS Code with the Nim plugin by Konstantin Zaitsev. Trying to go to the definition of the "spawn" proc is equally futile, *if* the "spawn" is actually followed by the proc you want to spawn, it's possible to go to a definition of the "spawn" otherwise. I made a small |
21:37:46 | yay | gist: https://gist.github.com/yay/425413483577f068acc3eca311e36a49 |
21:38:04 | PMunch | ECB is only 16 bytes at a time. The Python implementation just splits it into blocks for you, the Nim implementation doesn't |
21:45:22 | shashlick | PMunch: I've wrapped the openssl SHA code in case you are interested |
21:45:43 | shashlick | dom96: how many cores are you looking for? |
21:45:57 | PMunch | The nimSHA seems to be working fine, and then I don't have to depend on openssl :) |
21:46:26 | dom96 | shashlick: as many as possible :) |
21:46:40 | shashlick | so I've written a wrapper for c2nim that allows you to build the openssl SHA code into your binary, no dependencies |
21:47:06 | * | marenz_ joined #nim |
21:47:52 | PMunch | Hmm, is that allowed with openSSLs licence? |
21:48:55 | federico3 | I don't recommend implementing crypto algorithms. That's what well-tested libraries are for |
21:49:03 | shashlick | looks like, as long as they are acknowledged |
21:49:23 | shashlick | https://www.openssl.org/source/license.html |
21:49:42 | shashlick | federico3: that's why I wrapped openssl and just {.compile.} in the source directly |
21:50:00 | shashlick | it's about time I put this stuff on github for evaluation |
21:50:27 | shashlick | started with openssl SHA, i tried the tool on the Bass audio library and it works well |
21:50:29 | federico3 | also, the stdlib already uses openssl. Perhaps some of its primitives can be exposed. Also, I wrote a wrapper for libsodium |
21:50:40 | federico3 | (given openssl security history...) |
21:51:26 | shashlick | how easy/quick is it to get into the nimble directory? |
21:52:07 | FromGitter | <mratsim> Depends if you use nimble publish you will probably have to fix your PR manually :D |
21:55:28 | shashlick | dom96: does 2 CPU with 8 cores each count? |
21:56:10 | Araq | yay: possible, symbol lookups with an incomplete context are hard |
21:56:58 | yay | well, in this case symbol lookup with an incomplete context works :) |
21:57:54 | FromGitter | <data-man> With the curl I using https://github.com/ARMmbed/mbedtls |
21:57:59 | dom96 | shashlick: yeah, that would help. What sort of server is it? |
21:58:00 | yay | I mean, "spawn" all by itself is not a valid program, but symbol lookup works. Change it to "spawn hello(i)" and it stops working |
21:59:22 | shashlick | dom96: R740, i'll have to ask for time on it. Here's another one with 18 cores per CPU x 2 but will need time to figure out access/OS, etc. |
21:59:26 | shashlick | Dell R740 |
22:04:36 | shashlick | nimSHA2 is quite competitive with openssl and mailfs's SHA implementation, as long as you are in -d:release mode |
22:04:53 | dom96 | Hrm, it seems I can get the high CPU droplets on Digital Ocean on my personal account |
22:04:56 | dom96 | I might just do that |
22:06:05 | shashlick | dom96: cool |
22:06:59 | yglukhov | yay: Araq: module name lookup is a bug I told Araq a while ago. module name suggestion is commented out currently in nimsuggest =) |
22:07:16 | yglukhov | and i failed to uncomment it |
22:09:08 | yay | If only all bugs could be fixed by uncommenting stuff ;) |
22:09:54 | Araq | nimsuggest has an awesome test suite, unfortunately I need to make the tests green again and make travis run these tests |
22:10:22 | Araq | well "awesome" in the sense tests can be added easily and are declarative |
22:11:03 | shashlick | dom96: I have the 2 x 8 system on hand if you need it. has a linux on it |
22:11:10 | Araq | contributing to Nim is easy, go for it, yay |
22:11:18 | dom96 | shashlick: ok, i'll let you know :) |
22:11:24 | * | ipjk joined #nim |
22:11:27 | dom96 | thanks! |
22:15:54 | yay | Araq Hmm, ok, I'll try. |
22:16:30 | * | lurker quit (Quit: Leaving) |
22:28:29 | FromGitter | <Varriount> skrylar: How does fltk handle accessibility interfaces? |
22:35:57 | shashlick | skrylar: I'm also in TX :) |
22:37:19 | PMunch | Woo, now the decryption works |
22:37:37 | PMunch | Now I just gotta implement unzipping and it's pretty much done :) |
22:39:02 | * | PMunch quit (Quit: leaving) |
22:50:41 | FromGitter | <Varriount> PMunch: What are you making? |
23:05:07 | * | SusWombat quit (Ping timeout: 260 seconds) |
23:15:52 | * | yay quit (Quit: Textual IRC Client: www.textualapp.com) |
23:44:17 | * | vlad1777d quit (Remote host closed the connection) |
23:58:35 | * | yglukhov quit (Remote host closed the connection) |