00:00:34 | FromGitter | <zacharycarter> like I mean almost every web app / enterprise needs a database |
00:00:48 | FromGitter | <zacharycarter> and the DB support we have is built into the stdlib |
00:00:52 | FromGitter | <zacharycarter> and then there's ormin |
00:01:16 | FromGitter | <zacharycarter> but I mean - if a big company is evaluating Nim and that's the level of support for database access they have - they're not going to use Nim |
00:02:45 | FromGitter | <zacharycarter> it's also a chicken / egg scenario - because if no one is really using Nim for these things - how does the support for them arise in the first place> |
00:09:34 | * | simonsolnes quit (Ping timeout: 260 seconds) |
00:10:18 | * | jrbrt quit (Quit: jrbrt) |
00:11:38 | * | jrbrt joined #nim |
00:11:42 | FromGitter | <krux02> nim is not for big companies |
00:11:59 | shashlick | bodie_: skrylar spent some time on it https://github.com/Skrylar/skflatbuffers |
00:12:22 | FromGitter | <krux02> it cant provide the support |
00:12:23 | FromGitter | <zacharycarter> it could be though |
00:12:27 | FromGitter | <zacharycarter> it doesn't need to |
00:12:38 | FromGitter | <honewatson> yeah it could be |
00:12:56 | FromGitter | <zacharycarter> I mean - we're thinking about leveraging erlang-OTP and elixir at work |
00:13:09 | FromGitter | <zacharycarter> we don't expect any kind of support through that making that decision |
00:13:24 | FromGitter | <zacharycarter> you use OS software at your own risk - the choice boils down to what suits your needs the best |
00:13:46 | FromGitter | <zacharycarter> Nim is well maintained and has an active SDLC and fits certain problem domains exceptionally well |
00:13:55 | FromGitter | <zacharycarter> and support grows with the user base |
00:14:22 | skrylar | i forget what is missing from that lib |
00:14:28 | FromGitter | <honewatson> Nginx really became big after version 1. Got turned into a business etc I think I started using it around 0.5 and it was interesting watching the transformation |
00:14:36 | FromGitter | <zacharycarter> you could make exactly the same assertion with Rust if they didn't have Mozilla as an original backer |
00:14:40 | skrylar | it does work, although i think its missing flexbuffers and automatic serializatoin |
00:14:58 | skrylar | have been writing a protobuf compiler in smalltalk as of late, admittedly |
00:15:17 | FromGitter | <zacharycarter> smalltack is tits |
00:15:22 | FromGitter | <zacharycarter> smalltalk* |
00:15:28 | FromGitter | <zacharycarter> but I think you need to come back to Nim |
00:15:30 | FromGitter | <zacharycarter> :P |
00:15:47 | skrylar | going back outside the classbrowser sucks |
00:16:02 | FromGitter | <krux02> nim won't be used by big companies, because there are just not enough nim developers and nim training programs around. |
00:16:04 | FromGitter | <zacharycarter> :/ |
00:16:06 | skrylar | have to do it to work with godot and i'm constantly cringing at writing utility methods instead of bolting them on to where they belong |
00:16:13 | FromGitter | <zacharycarter> krux02: that's also a misconception |
00:16:24 | FromGitter | <zacharycarter> you don't need every developer at your org to know every language |
00:16:47 | FromGitter | <zacharycarter> you can hire a bunch of mediocre java / .NET / whatever devs to build a certain portion of your stack |
00:16:54 | FromGitter | <zacharycarter> but you can't build your entire stack with them |
00:16:58 | FromGitter | <krux02> big companies won't suddenly choose to developm in Nim. |
00:17:00 | FromGitter | <zacharycarter> otherwise you end up with a mediocre stack |
00:17:14 | FromGitter | <honewatson> I think Nim can work well in the start up space |
00:17:16 | FromGitter | <zacharycarter> well I've tempted carfax by saying - if Nim eventually gets AWS support |
00:17:23 | FromGitter | <zacharycarter> and a few other techs we rely on |
00:17:27 | skrylar | what do you need for AWS support; some serialization thing? |
00:17:34 | shashlick | the foot in the door will happen when it does one thing super well - one use case where it is super ready |
00:17:35 | FromGitter | <zacharycarter> it'd be a better alternative to Rust / C / C++ / etc... |
00:17:38 | FromGitter | <krux02> it will be small indie projecs or some experts who are frustrated with the established tools that will come to the Nim community. |
00:17:47 | FromGitter | <krux02> And they will mostly be alone |
00:17:58 | FromGitter | <zacharycarter> skrylar: Varriount and I are working on marshalling / unmarshalling and codgen from the botocore stuff |
00:18:16 | FromGitter | <krux02> Nim just needs to support such individuals to compete agains projects written with bigger teams |
00:18:18 | skrylar | hum. someone should port petitparser2 :) |
00:18:45 | FromGitter | <zacharycarter> never heard of it but I will look into it :) |
00:18:53 | skrylar | its a packrat/peg parser |
00:19:09 | FromGitter | <zacharycarter> I just don't think we should proceed with the conception that Nim can't become a language that enterprise or large orgs consider |
00:19:13 | skrylar | been using it in Pharo (smalltalk) to write the protobuf compiler |
00:19:27 | FromGitter | <zacharycarter> that's a self-defeating viewpoint IMO |
00:19:27 | FromGitter | <krux02> @zacharycarter did you see I have recursive ast matching in my ast_pattern_matching library |
00:19:31 | FromGitter | <zacharycarter> we should figure out how we can get there |
00:19:33 | CodeVantage_ | Here's a question, in which area does nim give you a competitive advantage? |
00:19:38 | skrylar | trouble with adoption: you need a GUI that isn't crud (nim fails here) and/or the ability to interact with existing service (i dunno. pharo has this trouble too) |
00:19:55 | FromGitter | <zacharycarter> @krux02 - I did - I haven't gotten to play around with it yet but I'm super excited to |
00:19:58 | FromGitter | <krux02> I use emacs, that is similar to Pharo/smalltalk |
00:20:04 | FromGitter | <zacharycarter> definitely when I start rewriting frag I will leverage it |
00:20:06 | skrylar | i did do that fltk wrapper that nobody uses, and a firebird that nobody uses, and got a little tired of spending some months effectively doing nothing (or feels like it) |
00:20:13 | FromGitter | <krux02> Pharo is a smalltalk vm and everything is smalltalk, emacs is a lisp-machine |
00:20:20 | FromGitter | <zacharycarter> anyway - afk for a few |
00:20:51 | skrylar | we need an approved gtk3 ffs. the stdlib is on 2, worlds moved on from that |
00:20:56 | FromGitter | <zacharycarter> skrylar: you sould work with @Varriount and I |
00:21:12 | FromGitter | <zacharycarter> I think you have more need for certain techs than we do |
00:21:28 | FromGitter | <zacharycarter> but I don't think that's any reason preventing us from collaborating on some more libs for Nim |
00:21:52 | FromGitter | <krux02> I will only develop what will also benefit me personally, and I don't like gui toolkits. |
00:21:55 | skrylar | the firebird one was for a request here |
00:22:12 | FromGitter | <krux02> I am much better off implementing button, on my own. |
00:22:15 | skrylar | wrapped most of the C lib, also had to write and scavenge docs for the whole thing |
00:22:25 | FromGitter | <zacharycarter> if I could lead such a life @krux02 ... :P |
00:22:34 | FromGitter | <zacharycarter> I can't employ myself that way though yet unfortunately |
00:22:53 | FromGitter | <krux02> well, to be honest I am pretty poor at the moment |
00:22:58 | FromGitter | <zacharycarter> hrm - well again I think we have a lot of people using nim in very niche use cases |
00:23:11 | FromGitter | <zacharycarter> we need to figure out like - what does everyone want from Nim potentially - and then build that |
00:23:12 | skrylar | interesting amount of game developers were interested in nim for a while there |
00:23:21 | FromGitter | <zacharycarter> <- one of them |
00:23:23 | FromGitter | <zacharycarter> also @krux02 |
00:23:32 | FromGitter | <krux02> But well, yea, we'll see how much I can do for the Nim community, when I actually get paid to not program in Nim. |
00:23:51 | FromGitter | <zacharycarter> yeah - it's like program in this shitty language to make money |
00:24:15 | FromGitter | <krux02> exactly |
00:24:26 | FromGitter | <zacharycarter> I was explaining to my manager though |
00:24:29 | FromGitter | <krux02> probably javascript, even though I will avoid that if I can |
00:24:31 | FromGitter | <zacharycarter> that's how you build a shitty engineering org |
00:24:42 | FromGitter | <krux02> but to be honest, no |
00:24:51 | FromGitter | <krux02> I think I can afford saying away from that |
00:24:54 | FromGitter | <zacharycarter> you'd be better off hiring C++ programmers fresh out of school |
00:25:08 | FromGitter | <krux02> there are just too many people around doing web fuzz |
00:25:10 | FromGitter | <zacharycarter> than hiring a java developer that doesn't understand what a pointer is |
00:25:12 | FromGitter | <zacharycarter> or a linked list |
00:25:14 | FromGitter | <zacharycarter> yeah |
00:25:16 | FromGitter | <krux02> I don't need to dig into that |
00:25:28 | FromGitter | <zacharycarter> but the thing is there too - you grow from there by adding complexity |
00:25:29 | FromGitter | <krux02> let somebody else fuck up the frontend code |
00:25:34 | FromGitter | <zacharycarter> like maybe today you're writing web apps |
00:25:40 | FromGitter | <zacharycarter> but then you start gathering data |
00:25:49 | FromGitter | <zacharycarter> so you need to start leveraging ML |
00:25:55 | FromGitter | <zacharycarter> and then you want to optimize your data pipeline |
00:25:58 | FromGitter | <krux02> I honestly don't see myself writing web apps. |
00:26:05 | FromGitter | <zacharycarter> I'm not sayhing you |
00:26:10 | FromGitter | <zacharycarter> I'm just saying enterprises in general |
00:26:20 | FromGitter | <zacharycarter> that's how AWS goes from being an ecommerce book selling web site |
00:26:24 | FromGitter | <zacharycarter> to the pinnacle of enterprise IT |
00:26:32 | FromGitter | <zacharycarter> they didn't stay in that ecommerce webdev model |
00:26:46 | FromGitter | <zacharycarter> they added complexity and yearned for results through software dev |
00:26:50 | CodeVantage_ | i thought amazon used a lot of money |
00:26:54 | * | jrbrt quit (Quit: jrbrt) |
00:26:56 | FromGitter | <krux02> The problem is that, by that point in time the codebase is su much screwed up and horrible to work with that nobody want to do it. |
00:27:00 | FromGitter | <zacharycarter> well I mean jeff bezos owns the washington post |
00:27:06 | FromGitter | <krux02> And some asshole then needs to dig through the shit. |
00:27:18 | FromGitter | <zacharycarter> well it's more about the asshole saying that it needs to be the way it is |
00:27:33 | FromGitter | <zacharycarter> like we have people at my company saying every single piece of data we store needs to be encrypted |
00:27:39 | FromGitter | <zacharycarter> wtf kind of crack are you smoking? |
00:27:48 | CodeVantage_ | lol |
00:27:55 | FromGitter | <zacharycarter> especially when you're moving to cloud based infrastructure where encryption costs money |
00:28:17 | CodeVantage_ | either its useless encryption ( too much work and not secure enough) |
00:28:22 | FromGitter | <krux02> well, encryption is actually important. |
00:28:22 | CodeVantage_ | or you can't do anything |
00:28:30 | FromGitter | <zacharycarter> you don't encrypt data you can easily google |
00:28:34 | FromGitter | <zacharycarter> is my point |
00:28:42 | FromGitter | <zacharycarter> which is what ppl at my company are suggesting we do |
00:28:49 | FromGitter | <krux02> but the way cloud companies work today, encryption is most of the time just an illusion |
00:28:59 | CodeVantage_ | Well maybe they meant the whole compute should be encrypted? |
00:29:05 | FromGitter | <krux02> an illusion to make the people feel safe |
00:29:05 | FromGitter | <zacharycarter> nah |
00:29:06 | FromGitter | <zacharycarter> it's like |
00:29:17 | FromGitter | <zacharycarter> we can't use dynamodb because it doesn't support encryption at rest |
00:29:33 | FromGitter | <zacharycarter> guess what - I'm pretty sure there are lots of companies w/ more sensitive data than carfax, leveraging dynamodb |
00:29:59 | FromGitter | <zacharycarter> it's just stupid over engineered standards that add complexity to our solutions |
00:30:10 | CodeVantage_ | yes. they use security guards |
00:30:10 | FromGitter | <zacharycarter> we didn't go to the could by starting out with like digital ocean or heroku or something |
00:30:13 | FromGitter | <krux02> copanies keep a backdoor in case the customer looses their key. In other words they have the key to the encrypted data next to the encrypted data. And that basically counts as not encrypted |
00:30:22 | CodeVantage_ | like physical people |
00:30:27 | FromGitter | <zacharycarter> it's like - let's go to the cloud, use every AWS service, slap kubernetes on top of it, manage everything through terraform etc |
00:30:55 | FromGitter | <zacharycarter> and then we'll take tools specifically designed for a task, and then manage them through another tool - not designed for that task |
00:30:55 | FromGitter | <krux02> what has terraforming to do with web development? |
00:31:13 | FromGitter | <zacharycarter> so we managed kubernetes on aws through kops- but then have to manage kops through terraform |
00:31:26 | FromGitter | <zacharycarter> it literally makes me want to jump out of a window most days |
00:31:30 | FromGitter | <zacharycarter> but I'm afraid I won't die on impact |
00:31:37 | FromGitter | <krux02> I don't know those tools, and I kind of don't want to. |
00:31:46 | FromGitter | <zacharycarter> I suggest you stay ignorant |
00:31:58 | FromGitter | <zacharycarter> kubernetes is nice if you use docker |
00:32:02 | FromGitter | <zacharycarter> otherwise just forget it existed |
00:32:06 | CodeVantage_ | hmmm . is the person in charge not that technically minded? |
00:32:16 | FromGitter | <krux02> yea, I take the second one. |
00:32:21 | FromGitter | <zacharycarter> well our architects often purport having worked w/ a certain tech for years |
00:32:25 | FromGitter | <zacharycarter> but you google them and find their github |
00:32:34 | FromGitter | <zacharycarter> and they of course have no repos demonstrating that knowledge |
00:32:38 | FromGitter | <krux02> docker is something I heared that it exists. I read about it, and then forgot what it was. |
00:32:39 | CodeVantage_ | and? |
00:32:48 | FromGitter | <zacharycarter> I mean - one of our architects suggested the other day that in order to "automate" something |
00:32:52 | FromGitter | <zacharycarter> we'd have to run a shell script twice |
00:33:10 | * | NimBot joined #nim |
00:33:23 | FromGitter | <zacharycarter> docker is pretty sweet - but if you're looking for a containerization solution - other open source alternatives exist |
00:33:43 | FromGitter | <krux02> tar.gz? |
00:33:43 | FromGitter | <zacharycarter> docker really serves the enterprise world - I just use it w/ Nim because I know it |
00:34:02 | FromGitter | <zacharycarter> no - more like LXC |
00:34:16 | FromGitter | <krux02> I don't know lxc |
00:34:22 | FromGitter | <zacharycarter> goolge/ wiki it |
00:34:29 | FromGitter | <zacharycarter> you might actually find it useful in some capacity maybe |
00:34:36 | FromGitter | <zacharycarter> or the concept anyway |
00:34:50 | FromGitter | <zacharycarter> just containerization really |
00:35:02 | FromGitter | <zacharycarter> evolved / better form of sandboxing |
00:35:10 | FromGitter | <zacharycarter> everything is ephemeral |
00:35:33 | FromGitter | <krux02> so it's basically multiple users on the same machine. |
00:35:33 | FromGitter | <zacharycarter> it's basically how the playground (which is almost done - tonight I hope) works |
00:36:02 | FromGitter | <zacharycarter> mmm - it's like spinning up an isolated environment for whatever you need |
00:36:08 | FromGitter | <zacharycarter> that is intended at the end of the day - to be destroyed |
00:36:10 | FromGitter | <krux02> where useres are "virtual-servers" |
00:36:18 | FromGitter | <zacharycarter> yeah essentially |
00:36:29 | FromGitter | <zacharycarter> but I mean - you have a docker daemon / service that runs |
00:36:43 | FromGitter | <zacharycarter> and manages all these containers |
00:36:51 | FromGitter | <zacharycarter> and you declare a container via a dockerfile |
00:37:02 | FromGitter | <zacharycarter> and then you can orchestrate containers via docker-compose |
00:37:08 | FromGitter | <krux02> I mean "isolated environments" that is basically what users on a linux machine get. Since I know linux. |
00:37:15 | FromGitter | <zacharycarter> well that's sandboxing |
00:37:26 | FromGitter | <zacharycarter> because the environment is meant to be persistent |
00:37:38 | FromGitter | <krux02> the only problem is that users can install software, and that is for servers not really cool. |
00:37:39 | FromGitter | <zacharycarter> containers are meant to be created and dertroyed |
00:37:44 | FromGitter | <zacharycarter> well docker solves that |
00:37:49 | FromGitter | <zacharycarter> or container sdo |
00:37:58 | FromGitter | <zacharycarter> like - if I want to install mysql on my machine and I don't really want to install it |
00:38:01 | FromGitter | <zacharycarter> I can use docker for that |
00:38:04 | FromGitter | <krux02> but I like for that think nixos. |
00:38:13 | FromGitter | <zacharycarter> yeah nixos is sweet |
00:38:31 | FromGitter | <zacharycarter> but containers are deployable to various infrastructure |
00:38:50 | FromGitter | <krux02> honestly, who cares about that? |
00:38:52 | FromGitter | <zacharycarter> so I might have a docker-compose file that says I have a postgresql database, a nginx reverse proxy, a nim web appp etc |
00:38:55 | FromGitter | <zacharycarter> well |
00:39:02 | FromGitter | <zacharycarter> I can take this docker setup |
00:39:03 | FromGitter | <krux02> you need a stable system that you can deploy to |
00:39:13 | FromGitter | <zacharycarter> and as long as whatever provider I wants supports docker |
00:39:16 | FromGitter | <zacharycarter> I can deploy it there |
00:39:26 | FromGitter | <zacharycarter> that's the thing - you define all that in your docker solution |
00:39:40 | FromGitter | <zacharycarter> so like - with the playground - I'm saying I have a reverse proxy serving up this porty |
00:39:42 | FromGitter | <zacharycarter> port* |
00:39:46 | FromGitter | <zacharycarter> and I have a webapp listening here |
00:39:55 | FromGitter | <zacharycarter> and I have a database listening on this port etc |
00:40:01 | FromGitter | <zacharycarter> and then if anything goes wrong with my environment |
00:40:05 | FromGitter | <krux02> I am not saynig docker isn't useful, but for me that is really something the OS should do. |
00:40:07 | FromGitter | <zacharycarter> I can just destroy the docker container instance |
00:40:13 | FromGitter | <zacharycarter> and spin it back up |
00:40:25 | FromGitter | <zacharycarter> meh - you can't always rely on the fact that your environment is going to match your needs |
00:40:35 | FromGitter | <zacharycarter> w/ docker - it doesn't matter if the host is windows or osx or linux or whatever |
00:40:37 | FromGitter | <krux02> then yeas switching the platform and the os would cost time/money. But that is something you wouldn't do too much anyway. |
00:40:46 | FromGitter | <zacharycarter> in the enterprise world you'd be surprised |
00:41:07 | FromGitter | <zacharycarter> especially because certain cloud providers - AWS, MS (Azure), Google (GCP) specialize in different things |
00:41:37 | FromGitter | <zacharycarter> so like - it's a best tool for the job situation |
00:41:53 | FromGitter | <zacharycarter> and if you can deploy a solution agnostic ally - that's your best bet |
00:41:55 | shashlick | zacharycarter is it really true that the OS doesn't matter |
00:42:03 | FromGitter | <krux02> well yea, it's useful. It has it right to exist |
00:42:15 | FromGitter | <zacharycarter> well as long as it's running docker it doesn't right? |
00:42:27 | FromGitter | <zacharycarter> because the docker image itself specifies what OS the container runs on |
00:42:38 | FromGitter | <zacharycarter> I mean - docker doesn't have like windows or osx images tmk |
00:42:43 | FromGitter | <zacharycarter> I think maybe it has windows images these days |
00:42:49 | FromGitter | <zacharycarter> but in terms of the host operating system |
00:42:53 | shashlick | Exactly so the container is still OS specific |
00:42:55 | FromGitter | <zacharycarter> I don't think it matters much |
00:42:58 | FromGitter | <zacharycarter> yes the container is |
00:42:59 | FromGitter | <zacharycarter> but not the host |
00:43:14 | FromGitter | <zacharycarter> that's what I was trying to get at |
00:43:28 | FromGitter | <zacharycarter> anwyay - I really need to pee / run downstairs so I'll be back in a bit |
00:43:28 | FromGitter | <krux02> but to me it sounds a bit like Java, it can be executed on every operating system. But it eats memory and is slow. |
00:43:33 | FromGitter | <zacharycarter> fuck java |
00:43:37 | FromGitter | <zacharycarter> and no docker isn't necessarily sow |
00:43:43 | FromGitter | <zacharycarter> you can run C programs w/ docker |
00:43:45 | FromGitter | <zacharycarter> or whatever |
00:43:46 | shashlick | So it's just that they have standardized an image format |
00:43:52 | FromGitter | <zacharycarter> exacxtly |
00:43:55 | FromGitter | <zacharycarter> much like LXC |
00:44:11 | FromGitter | <zacharycarter> docker doesn't do backwards compatibility very well though, and of course not open source - so |
00:44:21 | * | CodeVantage_ quit (Read error: Connection reset by peer) |
00:44:23 | shashlick | As an Enterprise you still have to pick that base OS |
00:44:27 | FromGitter | <zacharycarter> but IMO pick your battles - docker brings a lot to the table that other containerization solutions don't |
00:44:36 | FromGitter | <zacharycarter> yeah - I mean I use alpine for everything I can |
00:44:42 | FromGitter | <zacharycarter> because it's so slim |
00:44:52 | FromGitter | <zacharycarter> the goal of docker isn't to have a robust OS |
00:44:58 | shashlick | My understanding is that docker solves the distribution challenge |
00:45:00 | FromGitter | <zacharycarter> it's to build the slimmest runtime that can be shipped for your app |
00:46:15 | skrylar | rocket was neat |
00:46:40 | skrylar | is that still around? they were trying to codify something docker-esque as a standard so other people could implement it; there were some imps for linux and also one on freebsd through the jail mechanism |
00:47:16 | skrylar | always saw docker style stuff a means to deal with things like the java runtime hell more than anything |
00:47:38 | skrylar | for instance if install java 10, freeplane crashes all the time. while something else may need 10. but two docker images = problem solved |
00:48:42 | shashlick | Yep, this problem has been solved so many times |
00:49:44 | shashlick | Anaconda, choosenim, portable apps, etc etc |
00:49:52 | skrylar | am a fan of appimages |
00:50:14 | skrylar | Really wish elementary had backed appimagse instead of yet-another-appstore tbh |
00:52:24 | shashlick | Appimage looks interesting |
00:52:43 | skrylar | the theory is you just make an executable squashfs file and you run it. |
00:52:48 | shashlick | Every Linux distribution comes to mind, package manager |
00:53:06 | skrylar | i think it just does a fuse mount and runs a bash script |
00:53:11 | shashlick | It just feels like the same problem solved over and over |
00:53:11 | * | CodeVantage_ joined #nim |
00:53:25 | shashlick | Nothing really novel has come out |
00:53:31 | shashlick | Guess I'm getting old |
00:53:41 | skrylar | eh. diaspora happens |
00:54:14 | skrylar | when you don't have a powerful leader (Hobbs logic here) then people don't really cohease. and a lot of *nix people run away from attempts at cohesion |
00:55:49 | * | tersec joined #nim |
00:58:31 | tersec | I posted a response to https://forum.nim-lang.org/t/3772 a day or so ago, and while I can see it when I'm logged in, I can't when I'm logged out. What's going on? |
00:59:05 | tersec | Incidentally, https://forum.nim-lang.org/t/3772/3 gets linked to but 404s. |
01:01:44 | shashlick | You need to have dom96 enable your account |
01:04:09 | * | CodeVantage_ quit (Read error: Connection reset by peer) |
01:08:52 | * | CodeVantage_ joined #nim |
01:09:04 | * | cspar joined #nim |
01:13:40 | skrylar | i don't see anything special in this botocore yet |
01:14:21 | skrylar | zacharycarter is this just a bunch of faceplates to json calls? |
01:14:40 | CodeVantage_ | what happened to random? |
02:00:48 | * | SenasOzys__ joined #nim |
02:00:52 | * | SenasOzys quit (Remote host closed the connection) |
02:16:56 | * | dddddd quit (Remote host closed the connection) |
02:17:38 | * | tiorock joined #nim |
02:17:39 | * | tiorock quit (Changing host) |
02:17:39 | * | tiorock joined #nim |
02:17:39 | * | rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services))) |
02:17:39 | * | tiorock is now known as rockcavera |
02:35:53 | * | btbytes joined #nim |
02:41:19 | * | btbytes quit (Quit: Textual IRC Client: www.textualapp.com) |
02:53:38 | FromGitter | <zacharycarter> skrylar: yeah - some of the s3 services use XML and others use JSON for their APIs, I think botocore mainly contains the service specifications and utility code |
02:53:55 | FromGitter | <zacharycarter> boto3 is the python AWS sdk I think - and it's not at all idiomatic python from my understanding |
02:54:02 | FromGitter | <zacharycarter> more like Java written in Python |
02:56:42 | skrylar | i don't really need anything to do with AWS, although i guess i could fiddle with it for rep |
02:56:56 | skrylar | tbh if its just a faceplate, would write spec files and use converter scripts to generate the nim |
02:57:25 | FromGitter | <zacharycarter> well - I met with Varriount yesterday at starbucks and he identified 3 requirements |
02:57:43 | * | Snircle joined #nim |
02:58:15 | FromGitter | <zacharycarter> being able to marshal to specs like - https://raw.githubusercontent.com/boto/botocore/develop/botocore/data/s3/2006-03-01/service-2.json |
02:58:22 | FromGitter | <zacharycarter> and being able to unmarshal from them |
02:58:38 | FromGitter | <zacharycarter> and then being able to actually generate the datatypes and operations that they specify |
02:58:52 | FromGitter | <zacharycarter> I'm not sure what else is involved |
02:58:57 | FromGitter | <zacharycarter> if anything |
02:59:25 | skrylar | i seem to somehow keep getting roped in to writing low level bitcoding crap. lol |
02:59:43 | skrylar | OH i remember |
02:59:57 | skrylar | i had issues with reflecting data types in flatbuffer |
03:02:36 | * | Snircle quit (Client Quit) |
03:02:52 | skrylar | it turns out the protobuf wire format is pretty simple too |
03:03:18 | skrylar | has there been any progress on being able to shove tags on to object fields and reflect those at compile time (without having to eat the entire typespec in a macro) |
03:07:18 | FromGitter | <zacharycarter> umm |
03:07:22 | FromGitter | <zacharycarter> varriount and I were talking about this earlier |
03:07:27 | FromGitter | <zacharycarter> I don't knwo what tags are |
03:07:34 | FromGitter | <zacharycarter> we were looking at - https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-custom-annotations |
03:07:37 | FromGitter | <zacharycarter> is that the same thing? |
03:18:48 | skrylar | in Go you can use tildes on fields `likeThis` and its called a "tag" which does nothing but put some stuff on a type, which reflection can inspect |
03:19:09 | skrylar | custom annotations looks like araq got around to doing a good |
03:19:18 | skrylar | maybe i should go update the flatbuffers |
03:19:39 | skrylar | could also do native protobuf integration with those |
03:23:32 | FromGitter | <zacharycarter> :D |
03:24:22 | FromGitter | <zacharycarter> I am so pissed off right now - I ordered like $250 worth of shirts and hoodies last night off some website and then I opened the e-mail today and realized that I paid $6-$12 for shipping on every gd item |
03:24:23 | shashlick | can you do a chmod in nim? |
03:24:39 | FromGitter | <zacharycarter> not sure - I know you can copy with permissions |
03:24:44 | FromGitter | <zacharycarter> I'm guessing there's a way to |
03:25:25 | FromGitter | <zacharycarter> shashlick: https://nim-lang.org/docs/os.html#setFilePermissions,string,set[FilePermission] |
03:25:29 | FromGitter | <zacharycarter> mebbe? |
03:25:41 | shashlick | yep looks like, trying to figure out the syntax |
03:25:46 | shashlick | i want 755 |
03:26:01 | FromGitter | <zacharycarter> not sure how it abstracts it across OS's |
03:26:14 | FromGitter | <zacharycarter> oh |
03:26:18 | FromGitter | <zacharycarter> I see yeah |
03:26:23 | FromGitter | <zacharycarter> equating 755 to - https://nim-lang.org/docs/os.html#FilePermission |
03:26:24 | FromGitter | <zacharycarter> not sure haha |
03:26:56 | shashlick | :D |
03:27:23 | FromGitter | <zacharycarter> I don't even know what 755 is - I'm always just like - chmod 777 |
03:28:37 | FromGitter | <zacharycarter> ughhh this website is so deceiving - they have a shopping cart where you add items, but then when you place an order, every item your cart becomes an individual order |
03:28:51 | FromGitter | <zacharycarter> unless you order more than one of the same thing |
03:29:03 | FromGitter | <zacharycarter> none of this is explained up front though |
03:31:58 | * | endragor joined #nim |
03:32:06 | * | Snircle joined #nim |
03:32:53 | FromGitter | <zacharycarter> I'm sure my threat of a report to the BBB will scare them shitless and I will win free shipping on my entire order- but only time will tell :P |
03:33:23 | * | endragor quit (Remote host closed the connection) |
03:33:51 | * | endragor joined #nim |
03:38:03 | FromGitter | <zacharycarter> hrm - struggling w/ one last thing with the playground and docker |
03:39:08 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:42:17 | FromGitter | <zacharycarter> nm think I figured it out |
03:49:05 | shashlick | zacharycarter: let me know if you need any help with that |
03:49:57 | * | rockcavera quit (Ping timeout: 240 seconds) |
03:50:55 | FromGitter | <zacharycarter> I think it was just an issue with how I was calling execProcess and the differences between alpine and the container OS I was using previously |
03:51:11 | FromGitter | <zacharycarter> but if I can't get things to work I'll let you know, and thanks for offering help :D |
03:51:31 | FromGitter | <zacharycarter> gonna go to sleep, and hopefully wake up early to get some work finished on the playground |
03:51:50 | FromGitter | <zacharycarter> I'd like to hand it off tomorrow - and then start on revamping the front end to be like the wasm studio |
03:51:53 | FromGitter | <zacharycarter> but baby steps |
03:51:58 | FromGitter | <zacharycarter> anyway - goodnight! |
03:53:32 | * | rockcavera joined #nim |
03:53:32 | * | rockcavera quit (Changing host) |
03:53:32 | * | rockcavera joined #nim |
03:53:50 | CodeVantage_ | has anyone ever tried swig to make nim bindings? |
03:54:23 | CodeVantage_ | nite |
03:59:18 | * | leorize quit (Ping timeout: 255 seconds) |
04:01:00 | FromGitter | <gogolxdong> How to iterate files under directory? |
04:04:40 | * | CodeVantage_ quit (Read error: Connection reset by peer) |
04:21:40 | * | skrylar quit (Quit: Leaving) |
04:22:19 | FromGitter | <gogolxdong> Do we have to use listFiles in nimscript? |
04:24:31 | FromGitter | <gogolxdong> or oswalkdir? |
04:30:24 | FromDiscord | <bodie> are there any decent attempts using Nim to implement a compiler or scripting language? |
04:32:09 | shashlick | listFiles() in nimscript |
04:32:12 | shashlick | os won't work |
04:32:21 | shashlick | bodie_: nim is written in nim |
04:32:49 | FromGitter | <mratsim> @bodie: https://github.com/gokr/spry |
04:33:26 | FromGitter | <mratsim> the domain is down so read the blog: http://goran.krampe.se/category/spry/ |
04:36:45 | FromGitter | <mratsim> also for flat buffers: https://github.com/Skrylar/skflatbuffers |
04:37:06 | FromGitter | <mratsim> there are cap’n proto, protobuf and msgpack lib as well |
04:38:32 | FromGitter | <mratsim> otherwise for serializing this is quite promising: https://github.com/xomachine/NESM |
04:44:57 | * | leorize joined #nim |
04:54:24 | * | BitPuffin joined #nim |
04:57:31 | * | leorize quit (Quit: WeeChat 2.1) |
05:04:01 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
05:04:39 | * | Lord_Nightmare joined #nim |
05:22:57 | FromGitter | <gogolxdong> @shashlick I think walkFiles works. does nimscript module stand alone with c compiling? |
05:23:07 | * | endragor quit (Remote host closed the connection) |
05:32:26 | shashlick | Not sure I get that, nimscript is run with nim e |
05:32:44 | shashlick | It's Nim in script mode, nims file extension |
05:32:55 | FromGitter | <honewatson> Min Lang https://min-lang.org/ |
05:33:11 | shashlick | Or what you'd use in a nimble file |
05:34:48 | FromGitter | <gogolxdong> @shashlick yes, it is my concern , we compiled to to c . |
05:36:05 | shashlick | If you are compiling with nim c then you can use os procs |
05:36:30 | shashlick | Then there's no nimscript procs available or required for that matter |
05:36:39 | FromGitter | <gogolxdong> If the boundary of multi-part formdata is ------WebKitFormBoundaryYq9jZBAAoSjRSRKW, how to parse its body? |
05:37:13 | FromGitter | <gogolxdong> and is this boundary fixed for different browser? |
05:38:06 | * | xkapastel quit (Quit: Connection closed for inactivity) |
05:50:49 | * | endragor joined #nim |
05:50:51 | * | endragor quit (Remote host closed the connection) |
05:53:04 | * | endragor joined #nim |
06:12:03 | * | nsf joined #nim |
06:12:07 | FromGitter | <mratsim> @Araq, here you go with my first test of for-loop macros: https://gist.github.com/mratsim/5fed4b3c1f2f4ea613d155548101a783 |
06:12:39 | FromGitter | <mratsim> It’s promising |
06:17:25 | * | Senketsu_ joined #nim |
06:19:19 | Araq | gogolxdong: the boundary is always different. |
06:19:37 | FromGitter | <gogolxdong> @dom96 how to specify the boundary in multi-part formdata , like WebKitFormBoundaryYq9jZBAAoSjRSRKW, but changes every time. |
06:19:47 | Araq | you need to store it somewhere and detect it as the sentinel/end value |
06:21:35 | * | Senketsu_ quit (Ping timeout: 240 seconds) |
06:29:40 | * | tiorock joined #nim |
06:29:40 | * | tiorock quit (Changing host) |
06:29:40 | * | tiorock joined #nim |
06:29:40 | * | rockcavera quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
06:29:40 | * | tiorock is now known as rockcavera |
06:40:11 | * | skelett quit (Ping timeout: 255 seconds) |
06:41:24 | FromGitter | <Varriount> Araq: Why is it that for procedure ASTs, the pragma is available as a nkPragma node, but it types it's available as an nkPragmaExpr? |
06:41:41 | FromGitter | <Varriount> *but for type definition ASTs |
06:42:00 | Araq | {. .} vs identifier{. .} |
06:42:32 | Araq | an nkPragmaExpr does not contain only the pragma. |
06:42:48 | FromGitter | <Varriount> Yes, why not make it a sibling instead? |
06:43:01 | Araq | it's like nkBracket vs nkBracketExpr |
06:43:18 | Araq | [array construction] vs array[access] |
06:44:23 | FromGitter | <Varriount> Hrm, I never noticed that you can do `name{.pragma.}` with types. I assumed that the pragma would need to be separated by a space. |
06:44:25 | Araq | I don't know how it could be a sibling instead |
06:45:08 | Araq | but it would make some sense... |
06:48:08 | FromGitter | <Varriount> Araq: I ask because I'm currently refactoring the getCustomPragmaValue macro, as well as some other things. |
06:48:31 | FromGitter | <Varriount> I was updating the `pragma` getter/setter procs to handle type definitions. |
06:49:09 | Araq | ok |
06:50:48 | FromGitter | <Varriount> I did a double take when I realized that pragmas in type definitions aren't direct children of the type definition tree |
06:54:31 | * | PMunch joined #nim |
07:04:30 | FromGitter | <ephja> can valueless attributes be specified with buildHtml? not that it's really necessary |
07:07:35 | * | rokups joined #nim |
07:11:03 | Araq | br() |
07:11:09 | Araq | ^ like so? |
07:11:20 | * | couven92 joined #nim |
07:17:48 | FromGitter | <ephja> attributes, not elements; but <input disabled="..."> works |
07:20:11 | FromGitter | <mratsim> Regarding pragma, the {.inheritable.} pragma is really weird most type pragma are on the left but inheritable is on the right `type Foo = object {.inheritable.}` |
07:24:24 | FromGitter | <Varriount> @mratsim Really? Wow. |
07:24:34 | * | skelett joined #nim |
07:25:11 | FromGitter | <ephja> "buildHtml..." gah, so much typing. just make every element a macro so we don't have to type that every time ;) |
07:25:32 | FromGitter | <Varriount> ephja: PR? |
07:25:54 | * | BitPuffin quit (Remote host closed the connection) |
07:26:10 | * | user1101 joined #nim |
07:26:20 | FromGitter | <ephja> great lib |
07:27:07 | FromGitter | <Varriount> I mean, you could make a pull request adding the element macros |
07:30:25 | * | Lord_Nightmare2 joined #nim |
07:31:13 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
07:31:18 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
07:32:25 | * | BitPuffin joined #nim |
07:35:46 | * | Arrrr joined #nim |
07:35:46 | * | Arrrr quit (Changing host) |
07:35:46 | * | Arrrr joined #nim |
07:43:15 | FromGitter | <alehander42> @ephja you could just write your own `h` alias for buildHtml |
07:44:19 | FromGitter | <alehander42> I certainly wouldn't want my namespace polluted with span, br head and all of those |
07:45:19 | FromGitter | <mratsim> ^+1 |
07:45:59 | Araq | I'm really happy with Karax's DSL and don't want to change it |
07:46:50 | FromGitter | <ephja> more pollution! |
07:47:37 | FromGitter | <Varriount> Hm, you could do something like an `import htmlElements` in the procedure itself. |
07:48:01 | FromGitter | <Varriount> (Assuming Nim supports non-global imports) |
07:48:04 | FromGitter | <alehander42> yeah but that would be way more writing than just buildHtml :D |
07:48:32 | Araq | we don't support non-global imports. |
07:48:51 | Araq | they mess up the scoping rules, D had to add special rules for these |
07:54:29 | * | skrylar joined #nim |
08:02:53 | * | Lord_Nightmare2 joined #nim |
08:04:17 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
08:04:29 | * | yglukhov quit (Read error: Connection reset by peer) |
08:05:16 | * | yglukhov joined #nim |
08:07:53 | * | Lord_Nightmare joined #nim |
08:08:45 | * | Lord_Nightmare2 quit (Ping timeout: 264 seconds) |
08:12:54 | * | Lord_Nightmare2 joined #nim |
08:14:24 | * | Lord_Nig- joined #nim |
08:16:33 | * | Lord_Nightmare quit (Ping timeout: 265 seconds) |
08:16:34 | * | Lord_Nig- is now known as Lord_Nightmare |
08:17:45 | * | Lord_Nightmare2 quit (Ping timeout: 264 seconds) |
08:20:03 | * | BitPuffin quit (Remote host closed the connection) |
08:23:18 | * | BitPuffin joined #nim |
08:29:02 | * | Senketsu_ joined #nim |
08:30:11 | FromGitter | <narimiran> @mratsim no love for `forAll`? :( |
08:31:22 | FromGitter | <Varriount> @krux02 Any chance your AST pattern matching library will support partial matching? |
08:31:54 | FromGitter | <Varriount> I often need to match only the start of a tree, or from the end |
08:32:39 | * | Senketsu_ quit (Client Quit) |
08:35:23 | * | Senketsu_ joined #nim |
08:35:59 | FromGitter | <mratsim> @narimiran Anyway when Araq’s for-loop macro are out loopfusion will be either deprecated or rewritten or integratted in sugar.nim I’d say. |
08:37:16 | FromGitter | <mratsim> at least forZip can be found when we search for “Zip" |
08:37:33 | FromGitter | <mratsim> though it doesn’t roll off the tongue as nicely as forAll |
08:41:59 | FromGitter | <narimiran> ok, i get the rationale, hopefully we'll get built-in for-expresions soon.... |
08:47:19 | Araq | don't hold your breath |
08:47:42 | Araq | on the other hand, nothing in for-loop macro's design is tied to statements... |
08:52:24 | * | dddddd joined #nim |
08:54:57 | * | skrylar quit (Remote host closed the connection) |
08:55:09 | * | skrylar joined #nim |
09:05:45 | FromGitter | <mratsim> @alehander42 I checked your quicktest lib, nice work. I’d like more documentation on the number of tests, I’d like to do a 1 million, not 20 :P. Also it would be cleaner to use slices instead of min=0, max=20. |
09:07:14 | * | Senketsu_ quit (Quit: WeeChat 2.1) |
09:07:45 | FromGitter | <alehander42> yeah, the slice thing can be very easily arranged |
09:08:24 | FromGitter | <alehander42> I think right now you can already pass ⏎ ⏎ ```quicktest name, count do (arg: constraint): ⏎ ..``` [https://gitter.im/nim-lang/Nim?at=5adef40862316e0505f34c83] |
09:08:30 | FromGitter | <alehander42> the count |
09:09:08 | * | Senketsu_ joined #nim |
09:09:24 | FromGitter | <alehander42> the only thing I am not sure is if there wouldn't be a problem with the <x>int<y> types, can't remember if I added default handlers for them |
09:09:33 | FromGitter | <mratsim> 1_000_000 in non-release mode is a bad idea™ |
09:09:43 | FromGitter | <mratsim> Unhandled exception: /dev/urandom is not available |
09:09:45 | FromGitter | <mratsim> lol |
09:10:23 | FromGitter | <alehander42> well, yeah and I've tested it on linux and the js backend |
09:10:31 | FromGitter | <alehander42> for c backend the random gen depends on |
09:10:52 | FromGitter | <mratsim> na it works but it crashed at one point |
09:14:46 | FromGitter | <alehander42> hm, weird, I thought `/dev/urandom` should be always available |
09:15:04 | FromGitter | <alehander42> ah, you already opened an issue for uint, ok :D |
09:17:35 | * | Senketsu_ quit (Quit: WeeChat 2.1) |
09:18:27 | FromGitter | <alehander42> ah yeah, `min` and `max` are indeed useful, as Nim doesn't have infinite ranges |
09:18:38 | FromGitter | <alehander42> so you couldn't just specify e.g. -inf..4 |
09:18:49 | FromGitter | <alehander42> but an additional range arg would be still good |
09:35:54 | * | cspar quit (Ping timeout: 255 seconds) |
09:37:45 | * | gangstacat quit (Quit: Ĝis!) |
09:45:47 | * | gangstacat joined #nim |
09:55:48 | Araq | wow escape is used quite a lot |
09:58:01 | FromGitter | <mratsim> also @alehander42 it would be nice if it only prints when there is a failed test. |
09:58:55 | FromGitter | <mratsim> and then nice to have, having a counter 133/1000 tests (but that’s really like not important for quick tests) |
10:00:30 | FromGitter | <mratsim> ah it printed everything because of the urandom crash |
10:00:33 | FromGitter | <mratsim> :/ |
10:00:35 | FromGitter | <arnetheduck> @mratsim see - that's why those kind of things shouldn't be exceptions, but part of the API of the function that gives a random number, such that you explicitly ignore it ;) the "90% errors are passed up" isn't because it makes sense to pass errors up 90% of the cases - it's because exceptions encourage people not to think about how things fail, and write shitty code like that... |
10:01:54 | Araq | arnetheduck: cost-benefit analysis, it's a thing. |
10:02:00 | FromGitter | <mratsim> urandom not being available is exceptional though and |
10:02:19 | Araq | do a decent one to convince me. |
10:02:24 | FromGitter | <arnetheduck> not really.. it's just part of life |
10:02:49 | FromGitter | <mratsim> crashing is a good thing. You don’t want to produce sensitive random numbers with a broken urandom (though you shouldn’t anyway) |
10:03:29 | FromGitter | <arnetheduck> I think it's even a better thing if the api tells you it may go wrong and you choose whether to crash or not |
10:04:12 | Araq | you can check any large Go project to prove or disprove this 90% number. |
10:04:43 | FromGitter | <mratsim> I already see all Nim function with the {.discardable.} pragma :P |
10:04:49 | FromGitter | <arnetheduck> you don't think google did that analysis? |
10:05:11 | Araq | yes, I don't think so, Go was development based on gut feelings. |
10:05:15 | FromGitter | <alehander42> don't cargo cult google |
10:05:16 | FromGitter | <mratsim> Na, Google did a language they can teach to fresh out of school graduates |
10:05:25 | FromGitter | <alehander42> rob pike's team is very opionated |
10:05:35 | codevantage | mratsim i just use void instead |
10:05:39 | FromGitter | <mratsim> Araq is very opinionated too ;) |
10:05:49 | FromGitter | <arnetheduck> yeah, that's true.. they set out with a bunch of principles more likely and went from there |
10:06:05 | FromGitter | <alehander42> also this has philosphically nothing to do with errors vs exceptions but with how much is error checking enforced: ⏎ you can theoretically have strict exception tag checking and also ⏎ you can easily have error-based system where it's easy to ignore |
10:06:30 | FromGitter | <alehander42> this includes go too: iirc if your function returns just an error (it's void otherwise) you can actually just write `f()` |
10:06:53 | FromGitter | <alehander42> which is totally the opposite of the whole "you have to `(value, .., err) = call()` |
10:07:10 | FromGitter | <mratsim> well the thing is should 100’i8 + 100’i8 throw an exception or return an error code? |
10:07:41 | FromGitter | <arnetheduck> regardless, that's all beside the point I was making - which is that the choice of error model deeply affects the way that people write programs |
10:08:23 | FromGitter | <alehander42> the *nuances* in the particular design/implementation of an error model deeply affects how people write programs |
10:08:54 | Araq | your point might as well be that {.raises: [].} is heavily under-used |
10:09:00 | FromGitter | <arnetheduck> by hiding the fact that errors exist, you incentivize people to ignore errors - does anyone think that's controversial thing to claim |
10:09:33 | Araq | no, it's true. it's also a question of software development costs. |
10:09:50 | FromGitter | <arnetheduck> and as a corollary to that, if the compiler doesn't tell you, you'll ignore it |
10:10:06 | FromGitter | <alehander42> all I am saying is , you can still easily pretend errors don't exist in some error-based systems and you can have exception-based systems where you can't ignore possible errors |
10:10:12 | FromGitter | <mratsim> basically one of the main selling point of Arraymancer is being able to do: `let y = a * x + b` instead of `y = tf.add(tf.mul(a, x), b)` which is even worse if Google choosed to use error code. |
10:10:19 | * | Senketsu_ joined #nim |
10:10:21 | FromGitter | <alehander42> it is not an intristic property of exception:error at all |
10:10:48 | Araq | ^ alehander42 raises a good point. |
10:10:57 | FromGitter | <mratsim> also I think you can use a macro/const that enforce that all exceptiosn that can be thrown are checked exhaustively |
10:11:25 | FromGitter | <arnetheduck> @mratsim you can, but the language and the std lib sets the tone |
10:11:57 | FromGitter | <alehander42> also, you can still have most of both worlds: a block where you make calls (maybe using `?` to signify possible errors) and after that a compiler-enforced handler to deal with possible errors *or* escalate them up explicitly |
10:12:28 | FromGitter | <mratsim> I think @arnetheduck point is that if the stdlib uses exceptions, it’s hard to build on top on that when you require no exceptions |
10:12:59 | FromGitter | <mratsim> but the same is true for errors, I don’t know of a better system though (design by contract?) |
10:13:06 | FromGitter | <arnetheduck> @alehander42 true. I'm mostly arguing from the current reality of nim where errors are hidden, and I'm working on a project that will be managing your money |
10:13:12 | * | endragor_ joined #nim |
10:13:26 | FromGitter | <alehander42> it all depends: the stlid can tag all of its exceptions and you can have a way to call a function which turns the exception into an error |
10:13:55 | Arrrr | Really? |
10:14:17 | FromGitter | <alehander42> I mean that would be one possible implementation of a language where both can coexist |
10:15:30 | * | endragor quit (Ping timeout: 255 seconds) |
10:16:30 | Arrrr | I'd remove some of the exceptions in the std library, starting with the ones that happens while handling sockects. I'd rather check the result than instantiate an exception and face the cost of raising it |
10:17:14 | FromGitter | <mratsim> exceptions should be kept to exceptional stuff, a network connection can fail. |
10:17:28 | FromGitter | <arnetheduck> so can `/dev/urandom`, arguably |
10:18:06 | Araq | now we're getting somewhere; removing exceptions from the socket handling is something I can sympathize with |
10:18:20 | Arrrr | But I have always the choice to wrap whatever function inside a try-except. |
10:18:24 | Arrrr | *can |
10:18:29 | FromGitter | <mratsim> yes, but it should throw, it’s unsafe not to throw as an attacker can block /dev/urandom and it keeps giving you the same number otherwise (assuming it doesn’t throw) |
10:18:54 | Araq | on the other hand, rewrite osproc.nim in the style you propose and see where it takes you |
10:19:23 | Araq | the code just becomes check posixCall(....) |
10:19:25 | FromGitter | <arnetheduck> @mratsim it's unsafe to pretend you got a random number when you didn't.. you don't need an exception for that though |
10:19:25 | Araq | instead of |
10:19:31 | Araq | posixCall(...) |
10:19:46 | Araq | it just adds noise. |
10:19:50 | * | Senketsu_ quit (Quit: WeeChat 2.1) |
10:19:56 | FromGitter | <mratsim> but what should urandom do instead, it can’t return an error code |
10:20:20 | FromGitter | <arnetheduck> it can return an optional value |
10:20:44 | FromGitter | <arnetheduck> forcing you, the caller of the api, to make a conscious choice |
10:21:38 | * | Senketsu_ joined #nim |
10:21:41 | FromGitter | <arnetheduck> Araq, and for reliable software, it's not noise to say that you're ignoring errors explicitly - same as `discardable` |
10:21:53 | FromGitter | <alehander42> just wondering, why would enforcing the caller to check for the call's possible exceptions described in `{.raises: }` be any different? |
10:22:16 | FromGitter | <arnetheduck> so `check: posixcall1(); posixcall2()` is quite reasonable, overhead-wise |
10:22:46 | Araq | well Nim is so good at removing boilerplate that it muddles the arguments :-) |
10:23:38 | FromGitter | <krux02> Araq: did you see the matchAstRecursive construct? |
10:23:42 | * | Senketsu_ quit (Client Quit) |
10:24:19 | * | Vladar joined #nim |
10:24:33 | Araq | but still. Let's analyse some large Go programs. |
10:24:56 | FromGitter | <krux02> After you mentioned it yesterday evening I just implemented it. |
10:25:05 | Araq | krux02: link please |
10:25:11 | FromGitter | <arnetheduck> @alehander42 it wouldn't be different, but it would also not be feasible or useful - anything that does arithmetic throws so there's practically nothing you can do without exceptions |
10:25:55 | FromGitter | <krux02> https://github.com/krux02/ast-pattern-matching/blob/master/src/ast_pattern_matching.nim#L503 |
10:27:47 | Araq | exceptions are hurting me in the compiler btw. |
10:27:54 | Araq | why? |
10:28:21 | Araq | because I shouldn't do "on error bubble up". |
10:28:53 | Araq | instead semantic checking should continue and do its best. it's required for nimsuggest to work. |
10:29:02 | FromGitter | <alehander42> @arnetheduck so, sometimes it's ok to ignore errors, but sometimes not ? |
10:29:35 | Araq | so it's not like I can't see the merit in your argumentation. |
10:29:51 | FromGitter | <alehander42> how would you deal with arithmetic edge cases then in an error-based system? |
10:30:03 | * | SenasOzys joined #nim |
10:30:28 | Araq | alehander42: with saturated arithmetic, preferably one where min/max are sticky. like NaN is. |
10:30:29 | FromGitter | <krux02> Araq: I thought about your argument about range and that you want to deprecate static[T] |
10:30:30 | * | SenasOzys__ quit (Read error: Connection reset by peer) |
10:30:39 | FromGitter | <alehander42> @arthe with exceptions, it would be simple: a call can still say : "this exceptions should be checked |
10:30:57 | FromGitter | <krux02> I came to the conclusion that the range type is nothing else than a special case of static[T] |
10:30:59 | FromGitter | <alehander42> and these exceptions can be ignored" |
10:31:17 | FromGitter | <krux02> it is static[tuple[low,high:int]] |
10:31:19 | FromGitter | <arnetheduck> @alehander42 they tried that in c++ and removed it.. they also tried it in java, and everyone started using the unchecked ones |
10:31:56 | FromGitter | <alehander42> @arnetheduck so why did that happen? because people don't like to check all of their errors |
10:32:42 | FromGitter | <krux02> @alehander42 please no, checked exceptions are awful |
10:32:48 | FromGitter | <alehander42> still, you have to give an alternative: how would you deal with a `/` that can fail |
10:33:24 | FromGitter | <mratsim> it returns (div, mod, error code) |
10:33:26 | FromGitter | <krux02> Java has checked exceptions and it leads to catch-discard handling to silence tho compiler. That just makes the code worse |
10:33:38 | FromGitter | <alehander42> @krux02 but some error-based systems seem to me as bizarre+more manual based half broken implementation of checked exceptions |
10:33:41 | FromGitter | <alehander42> e.g. Go |
10:33:58 | * | max3 quit (Quit: Connection closed for inactivity) |
10:34:30 | FromGitter | <krux02> and Scala (compiles to java virtual machine) understands java exceptions, can declare some "throws" annotations, but generally it just ignores all of the throws declarations |
10:34:49 | FromGitter | <alehander42> @krux02 that's not a fundamental issue with them, you can do the same in Go in two different ways |
10:35:10 | FromGitter | <krux02> the go error result type isn't cool either |
10:35:32 | FromGitter | <alehander42> @mratsim so how do you chain `/` then? |
10:35:41 | FromGitter | <krux02> and it is not mandatory. |
10:35:49 | FromGitter | <mratsim> you can’t and it’s sad |
10:35:59 | Araq | alehander42: I just told you. saturated arithmetic. |
10:36:21 | FromGitter | <mratsim> how do you saturate a divide by zero? |
10:36:31 | Araq | that's just MAXINT |
10:36:56 | FromGitter | <mratsim> 0/0 is not maxint |
10:36:56 | Araq | the model I propose is widely deployed in the form of IEEE floating point math. |
10:36:58 | FromGitter | <alehander42> @Araq I am talking in general |
10:37:08 | Arrrr | I'd rather have the option of throwing exceptions than nothing at all. It is not a matter of using exceptions or return code for everything. |
10:37:09 | FromGitter | <alehander42> about operators and various problem domains |
10:37:28 | FromGitter | <alehander42> it's always possible that an operation would make sense to have an exceptional condition |
10:37:41 | Araq | in general you need NaN or something comparable. |
10:38:12 | FromGitter | <krux02> @alehander42 yea but the exceptional conditions should be assumend to be exeptional and therefore should not be forced to be checked |
10:38:36 | FromGitter | <krux02> I think the best alternative to excepitons is the result type from rust. |
10:39:03 | Araq | I think it doesn't work. Rust dies on OOM. |
10:39:17 | FromGitter | <alehander42> @krux02 I think that's just a not very useful language argument, exceptions are one error-handling mechanism, the fact that they are called "exceptions" shouldn't matter |
10:39:32 | FromGitter | <krux02> OOM? |
10:39:43 | Araq | out of memory. |
10:40:09 | Araq | if something like Result would truely work it would be useful for basic arithmetic and OOMs. |
10:40:13 | FromGitter | <alehander42> @Araq yes but NaN is not an error: you can't return info about *what* happened that was wrong |
10:40:31 | FromGitter | <krux02> well almost all programs die on out of memory. But out of memory isn't really happening anymore, it is rather the entire system is swapping and becomes unusable. |
10:40:54 | Araq | that's not the point. |
10:42:43 | FromGitter | <krux02> then I don't get the point. |
10:42:58 | FromGitter | <krux02> But I also think it does really matter at the moment |
10:43:01 | Araq | the point is OOM and arithmetic errors are really pervasive and so nobody uses Result<> for it. |
10:43:35 | FromGitter | <krux02> ah, ok, now I get it |
10:44:04 | Araq | there is a reason Haskell, Ada, Erlang all have exceptions. |
10:44:26 | Araq | and two of these have been designed with incredible reliability in mind. |
10:44:50 | Araq | do you really think the Haskell people don't know about the Either monad? |
10:48:56 | Araq | btw another argument against exceptions would be that while the "stack unrolling" is automatic there is no "heap unrolling" and usually the heap/stack distinction is a low level detail programmers are not aware of. |
10:49:47 | * | simonsolnes joined #nim |
10:49:47 | Araq | so yeah, we can enumerate the arguments, let's look at some numbers. |
10:51:14 | FromGitter | <krux02> I know about the either monad from scala, and scala has a lot of Haskell influence. |
10:51:35 | FromGitter | <krux02> But I didn't find the Either Monad very usable |
10:53:11 | FromGitter | <krux02> Araq: I am very aware if something is on the heap or the stack. |
10:54:19 | FromGitter | <krux02> But we should all agree that exeption handling is not a pattern that should be sprinkled all over the codebase. |
10:55:22 | codevantage | core code base or in general? |
10:56:34 | FromGitter | <krux02> in general |
10:56:46 | FromGitter | <krux02> I don't know what you mean with core code base |
10:56:58 | codevantage | like nim itself |
10:57:05 | codevantage | kernel |
10:57:22 | codevantage | the nim stdlib |
10:57:32 | FromGitter | <krux02> execption handling is somthing that should not be in the core at all. Maybe somewhere outside in the outer shell parts of the program to do error reporting |
10:57:37 | FromGitter | <ephja> how do I run some code after karax has rendered the DOM? that is, some time after onload has been dispatched |
10:58:05 | FromGitter | <krux02> what do you like about the nim stdlib? |
10:59:14 | codevantage | stdlib works. |
10:59:48 | Araq | ephja: there is a onPostRender callback you can pass to karax's init |
10:59:54 | FromGitter | <krux02> works? |
10:59:56 | Araq | sorry, forgot the real names. |
11:00:24 | FromGitter | <krux02> Araq: you still didn't loose a word about the recursive ast pattern matching that I wrote because you asked for it |
11:00:40 | Araq | krux02: oh yeah, how can it work? |
11:01:02 | codevantage | as long as stdlib works then what else can i ask for? |
11:01:05 | Araq | how did you solve the problem that you don't know the 'self(paramsHere)' call? |
11:01:24 | FromGitter | <krux02> it just does the normal matching on the root node and when it doesn't match it does also on all child nodes |
11:01:49 | FromGitter | <krux02> which self? |
11:01:49 | Araq | but it needs to do it recursively |
11:01:54 | Araq | exactly. |
11:02:35 | FromGitter | <arnetheduck> I'd think performance numbers are largely uninteresting in this discussion and perhaps useful as the last tipping of the scale, all else being equal .. even the whole zero-cost vs if-branches vs EH tables is in the zone of negligible things that you can optimize where it matters.. what I'm missing is that when you're working with exceptions, you can come pretty far without caring about errors and you have this warm |
11:02:35 | FromGitter | ... chummy feeling everything is fine, because your understanding of what can go wrong is inherently limited to your own little head, then you end up with a shitty code base that you wish dealt with errors across the board in a sane way (ie compiler, nimsuggest).. there's no teaching moment where you can draw upon the ... [https://gitter.im/nim-lang/Nim?at=5adf0ecb1130fe3d360e8405] |
11:02:38 | FromGitter | <krux02> I wrote a function that calls a callback recursively on each node |
11:03:03 | FromGitter | <krux02> the result of the function is a bool and says it the function should go down deeper or not. |
11:04:00 | FromGitter | <krux02> and the matching expression just compilies to a call to this function. |
11:04:03 | FromGitter | <arnetheduck> it's like globals.. sure, they're a nice shortcut, but when was it that you had a nicely designed lib and thought to yourself, "oh, I really wish I had used a global here"? the reverse happens almost every time a mutable global is involved, usually at a point when it's expensive to do something about it |
11:05:42 | FromGitter | <krux02> @arnetheduck well sometimes globals are just the better alternative |
11:06:15 | FromGitter | <krux02> I know mutable global variables suck, but sometimes that is what suits the purpose best. |
11:06:21 | FromGitter | <arnetheduck> yeah, sure, as long as you're writing a 1-page script, they're great ;) |
11:06:40 | FromGitter | <krux02> on I mean really big projects |
11:06:49 | FromGitter | <krux02> sometimes it is just not suitable to do anything else |
11:07:26 | FromGitter | <alehander42> @arnetheduck again, this is true, but it has nothing to do *fundamentally* with the fact that a system is exception or error-based, but with the way it enforced one to deal with those cases |
11:08:16 | FromGitter | <arnetheduck> and again, @alehander42 , I'm looking at exceptions as they look and are used in nim, today, after 10 years of std lib development and whatnot |
11:08:29 | FromGitter | <alehander42> oh exactly, that's my next point |
11:08:50 | FromGitter | <arnetheduck> and clearly, something is wrong there, and I don't want my next project to end up the same ;) |
11:08:53 | FromGitter | <alehander42> if I have an existing language & ecosystem, which would be easier: rewrite 80% of error handling *everywhere* into a different paradigm, or improve the existing one, so people couldn't ignore it so easily |
11:09:25 | Araq | well you can't blame exceptions for every problem in Nim. |
11:10:03 | * | athenot joined #nim |
11:10:45 | codevantage | my main problem with exceptions is that people dont use them, or think printing a string is an exception? |
11:10:59 | Arrrr | Btw, how are symbol files going on? |
11:11:37 | FromGitter | <arnetheduck> no, of course not, there are many kinds of evils that experience has taught us could be improved :) I used to love exceptions! |
11:12:07 | Araq | oh that's interesting to hear. |
11:13:06 | FromGitter | <arnetheduck> .. and I still like them for some things! |
11:13:09 | * | athenot_ joined #nim |
11:13:23 | Araq | Arrrr: they are like the dragons in game of thrones. |
11:13:30 | Araq | they are coming. |
11:13:50 | FromGitter | <krux02> Wasn't that the winter |
11:14:09 | FromGitter | <arnetheduck> @krux02 what are those sane usages of writable globals? |
11:14:27 | Arrrr | I haven't read GoT |
11:14:50 | FromGitter | <krux02> @arnetheduck http://etodd.io/2017/03/29/thirteen-years-of-bad-game-code/ |
11:14:57 | * | athenot quit (Ping timeout: 240 seconds) |
11:15:04 | Araq | arnetheduck: it depends on the problem domain. for games you have this huge messy mutable shared state and passing it to every proc via a parameter doesn't make it prettier. |
11:15:09 | FromGitter | <alehander42> so yeah, replacing exceptions before v1 is an insane idea, except if you're ready to rewrite 100_000 nim lines of code |
11:15:20 | FromGitter | <krux02> he mentions the World Object that he passes down to everything |
11:15:21 | FromGitter | <alehander42> improving them on the other hand: entirely possible |
11:15:41 | FromGitter | <krux02> but the program doesn't have several World instances, and the World is just mutable |
11:15:57 | FromGitter | <krux02> it is just much more sane to keep the world a global thing |
11:17:45 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
11:18:04 | * | flyx quit (Ping timeout: 260 seconds) |
11:18:20 | FromGitter | <krux02> "However, almost all gameplay code needs access to the entire world state. I 'solved' this problem by storing everything in a 'world' object and passed the world into every single function. No more globals! I thought this was great because I could theoretically run multiple, separate worlds simultaneously." |
11:19:51 | FromGitter | <arnetheduck> @krux02 from what I can tell, that article doesn't say anything about globals vs non-globals.. it merely states that if you have a design that includes a global, make it a global and not a disguised local |
11:19:53 | FromGitter | <krux02> @arnetheduck I am completely on your side when you mean avoidable globals. Or avoidable global state. But obscuring global state, well that is just bad. |
11:20:28 | * | noonien joined #nim |
11:20:44 | FromGitter | <krux02> @arnetheduck I just gave you the quote. |
11:21:02 | Araq | well in the compiler the disguised locals are much better than real globals... :-) |
11:21:16 | FromGitter | <krux02> Araq: are they? |
11:21:20 | Araq | yep. |
11:21:31 | Araq | I am slowing getting rid of the globals. |
11:21:45 | FromGitter | <arnetheduck> in the compiler, a main reason I don't wanna touch repl for nlvm is all the globals.. once you're done, I might consider it :) |
11:21:47 | FromGitter | <krux02> if it makes you happy. |
11:22:18 | Araq | globals make the compiler-as-an-API super shitty. |
11:22:53 | Araq | doesn't apply to game development though, games are usually not shipped as an API. |
11:23:06 | FromGitter | <krux02> modding API :P |
11:23:09 | * | Lord_Nightmare joined #nim |
11:23:33 | Araq | the globals also make symbol files harder... |
11:24:09 | FromGitter | <krux02> Well I can't really argue here, because I have never written a real compiler |
11:26:55 | FromGitter | <alehander42> basically if somebody will reuse your code as a lib somewhere, globals are bad, otherwise you probably can get away with a `world` object if you really use one |
11:27:16 | FromGitter | <mratsim> I think the guys who wrote OpenCL forgot about that |
11:28:11 | FromGitter | <alehander42> I guess it shouldn't be too hard to also refactor such a thing automatically: if you need, just gen the static call graph, everywhere you depend (or your calls) on the `world` object, pass it as first argument |
11:28:16 | FromGitter | <mratsim> You basically have to have a global or ask everyone to call the kernel with `let err = OpenCL_enqueue_write(context, x, y, awesome_add_kernel)` |
11:28:36 | codevantage | theres a diff between module level global and magical globals |
11:29:33 | Araq | what are magical globals? |
11:29:56 | FromGitter | <mratsim> also error codes mean “let” variable becomes incredibly painful to use. |
11:32:19 | codevantage | magical globals is something where you import a module and it effects modules that havent imported it |
11:33:30 | codevantage | but if you already know what globals a module holds there isnt any surprise. |
11:37:06 | * | flyx joined #nim |
11:40:35 | FromGitter | <mratsim> I like this pieace on Exception vs Errors: https://nedbatchelder.com/text/exceptions-vs-status.html |
11:44:52 | FromGitter | <mratsim> the comments section show that the debate was still as hot 15 years ago |
11:46:03 | FromGitter | <alehander42> the invisible code argument is good one, haven't thought of it |
11:52:11 | FromGitter | <Vindaar> One thing about status codes I don't get: if I want to have a proc return some value, I can't return a status code as well (unless I always return a tuple). Or I have to use procs with a `var` arg instead, which is mutated (esp. in Nim when I love to use `let` that's a deal breaker). Both are ugly to me. Am I missing something? |
11:53:18 | FromGitter | <krux02> aren't status codes just for unix shell |
11:53:45 | FromGitter | <Vindaar> we're talking in context of exceptions / error handling, no? |
11:53:52 | FromGitter | <krux02> ah, ok |
11:54:04 | FromGitter | <krux02> status codes are hidden error values. |
11:54:13 | FromGitter | <krux02> just return the error, status codes stink |
11:54:53 | FromGitter | <Vindaar> wait, "just return the error", what do you mean? Maybe I don't get your distinction between status code and error |
11:55:43 | FromGitter | <alehander42> @mratsim I have support for many ints and ranges now, the urandom thing is very weird on my machine: it seems if I tweak the random lib to get bigger chunks from urandom, it can easily support indefinite amount of values, but if you do >1022 of OPEN /dev/urandom it |
11:55:45 | FromGitter | <alehander42> oh wait |
11:56:03 | FromGitter | <alehander42> oh man |
11:56:13 | FromGitter | <alehander42> ok I'll fix the random lib |
11:56:22 | FromGitter | <alehander42> it opens >=1024 connections probly |
11:57:01 | FromGitter | <mratsim> there’s an additional “real example” for the debate between this dev and Joel Spolsky (founder of Stack Overflow): https://nedbatchelder.com/text/exceptions-in-the-rainforest.html |
11:57:08 | FromGitter | <krux02> an error is an object or a pointer to an object that tells you what is wrong. A status code in an idex into an unknown array of predefined error objects, where you first have to find out what array is actually meant where that array is to know what's wrong |
11:57:36 | FromGitter | <Vindaar> @krux02 ahh, that makes sense. thanks |
11:57:47 | FromGitter | <arnetheduck> @mratsim I think everyone agrees that using plain error codes is broken in all the ways you say - no way to compose, monopolizes return code, leads to quirky API, and something else was systematically introduced, it wouldn't be that |
11:58:09 | FromGitter | <mratsim> The challenge in building a large system is making sure errors get communicated around. Exceptions are a better way to do that than status returns: ⏎ ⏎ Exceptions can carry richer information. If error handling is so important, why try to cram it all into a DWORD? ⏎ Exceptions let the B-layer get on with its work without being a mindless bucket brigade for status returns. ⏎ Exceptions make human error (failure |
11:58:09 | FromGitter | ... to catch) visible, while error returns make human error (failure to check) invisible. ... [https://gitter.im/nim-lang/Nim?at=5adf1bd126a769820b2bfb1c] |
11:58:45 | FromGitter | <mratsim> Well in Nim we would have Error Enum not error code. |
12:00:42 | FromGitter | <mratsim> I’m all for something better than exceptions as long as it does not clutter function return values. |
12:01:24 | FromGitter | <alehander42> wait this bug is fixed in the lib |
12:05:53 | * | SenasOzys quit (Ping timeout: 248 seconds) |
12:06:14 | FromGitter | <arnetheduck> @mratsim using `rust` results as an example, ⏎ ⏎ > Exceptions can carry richer information. If error handling is so important, why try to cram it all into a DWORD? ⏎ ⏎ so do `results`, if you want them to - canonical example here is the `Future` - you raise an error, catch it, store it in a future instance, read it from the instance and then rethrow it so there's no reason a result cannot do the same |
12:06:14 | FromGitter | ... ... [https://gitter.im/nim-lang/Nim?at=5adf1db62b9dfdbc3ac30774] |
12:07:11 | FromGitter | <alehander42> @dom96 if a lib has a new commit after tag x, I can only install it with `lib #head` right? |
12:07:21 | FromGitter | <alehander42> that was my mistake, the lib is fixed, it just needs a new version |
12:07:53 | FromGitter | <alehander42> tag |
12:11:05 | FromGitter | <mratsim> @arnetheduck I agree that Results/Either are better than error codes. They really need synctatic sugar (no `unwrap`, but `>>=` or `?` are fine). The thing is, if something fails in the low-level part of your code, and you want to display it on CLI or in a UI, you have to bubble up the error to the top. Meaning all layers should be have some stuff to carry low-level failures. |
12:11:25 | FromGitter | <mratsim> I’m not sure how to do that cleanly? |
12:13:10 | * | ieatnerds joined #nim |
12:15:09 | * | SenasOzys joined #nim |
12:16:20 | FromGitter | <arnetheduck> if you want to display something on a high-quality UX, for sure it's not gonna come as a low-level exception from the bowels of your app.. to make it interesting, let's use a regex as an example, and what the choices signal: ⏎ ⏎ 1) an exception tells you that malformed regexes are really weird and the user should be punished with a call stack for making them.. the maker of the GUI will likely not catch the |
12:16:20 | FromGitter | ... exception and deal with it, except in some high-level catch-all and ugly generic dialog that follows |
12:16:48 | bodie_ | any pointers on gui? I was looking at the nuklear bindings but I'm hesitant |
12:17:01 | FromGitter | <arnetheduck> 1) an error code will lead to the developer of the UX to consider both as things that can naturally happen, and will choose to shade the regex edit box red |
12:17:22 | * | alpha joined #nim |
12:17:45 | * | alpha is now known as Guest56261 |
12:18:22 | FromGitter | <arnetheduck> yet, when regexes are involved, I can be pretty sure that languages with exceptions will have a regex library that raises on syntax error - that's the most natural thing to do |
12:18:42 | Guest56261 | Re: exceptions vs errors - zig (another new WIP language) also NOT uses exceptions, it uses something similar to Rust |
12:18:44 | Guest56261 | https://ziglang.org/documentation/master/#Errors |
12:19:03 | bodie_ | C also doesn't use exceptions. :P |
12:19:09 | bodie_ | You can bolt them on though. |
12:19:39 | FromGitter | <mratsim> you can do a try finally though |
12:19:40 | Guest56261 | Well, sane people nowadays also don't use C unless they work on a problem domain where they don't have a choice. |
12:20:53 | * | Guest56261 is now known as Alpha1220 |
12:23:57 | * | euantor quit () |
12:24:02 | bodie_ | sane people also don't use exceptions: https://google.github.io/styleguide/cppguide.html#Exceptions |
12:24:15 | * | euantor joined #nim |
12:24:33 | Araq | well the things is, Nim is not Java or C# or C or C++. |
12:24:51 | Araq | Nim's exceptions have been enriched with exception tracking. |
12:24:56 | FromGitter | <arnetheduck> bodie_ that guide is a sad lobotomization of c++ :) |
12:25:16 | Araq | we need real world data on how .raises: [] works in practice. |
12:25:55 | * | leorize joined #nim |
12:26:27 | * | Senketsu_ joined #nim |
12:26:29 | FromGitter | <Vindaar> @bodie_: well... "Our advice against using exceptions is not predicated on philosophical or moral grounds, but practical ones. Because we'd like to use our open-source projects at Google and it's difficult to do so if those projects use exceptions, we need to advise against exceptions in Google open-source projects as well. Things would probably be different if we had to do it all over again from scratch." |
12:26:32 | Araq | C started with no exceptions, C++ added them, Java made them checked, C# made them unchecked again |
12:26:50 | Araq | Nim made them tracked. |
12:27:49 | Araq | the idea here was that you start with quirky code and gracefully add .raises: [] into some critical key points to make the compiler prove it is safe. |
12:27:53 | FromGitter | <arnetheduck> Araq, well, it doesn't, if 10 years of nim experience is any guide - if it was a killer feature, it would be all over the place |
12:28:29 | Alpha1220 | Most people won't use .raises:[] or any other safety precautions if they have any friction associated with them, most people wan't to prototype quickly. Nim is really great at that IMHO but well if you think about errors or exception tracking or whatever, it is better to enforce security than to make stuff optional. |
12:28:29 | Araq | sorry, but 10 years of Nim experience really isn't any guide. ;-) |
12:29:08 | Araq | Swift added exceptions too afaik. |
12:29:16 | bodie_ | exceptions / panics are a last-ditch resort to avoid undefined behavior I suppose. |
12:29:28 | Araq | and is recently new and Objective-C wasn't big on exceptions either. |
12:29:42 | bodie_ | wouldn't it be better just to disallow that and provide a macro to make raising errors easier? something like Rust's ? macro |
12:30:20 | bodie_ | quick question here: does Nim support MSVC? https://nim-lang.org/install_windows.html |
12:30:43 | bodie_ | I'm not comfortable using GCC / MinGW for Windows-native applications |
12:30:58 | Alpha1220 | https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/ErrorHandling.html Exception handling without call stack unwinding. |
12:31:01 | FromGitter | <mratsim> You can compile it with VCC |
12:31:52 | bodie_ | mratsim -- I don't want my users on Windows to have any difficulty at all. if I can just toss them a tool and a source, it should just work as long as they have msvc installed, imo. it's hard enough to get windows users to set up msvc and the developer prompt |
12:33:21 | Alpha1220 | Nim works with msvc I think (except for vs2017 because it changed the paths and there is a WIP since a long time PR (and a few Issues on GH)) regarding vs2017. |
12:34:05 | bodie_ | like, actual work in actual progress, or "dead end" :P |
12:34:39 | Araq | Alpha1220: these look like exceptions to me |
12:35:51 | * | odc quit () |
12:35:57 | Araq | "Because the vend(itemNamed:) method propagates any errors it throws, any code that calls this method must either handle the errors—using a do-catch statement, try?, or try!—or continue to propagate them. For example, the buyFavoriteSnack(person:vendingMachine:) in the example below is also a throwing function, and any errors that the vend(itemNamed:) method throws will propagate up to the point where the buyFavoriteSnack(person:vendingMachine: |
12:35:57 | Araq | ) function is called." |
12:36:09 | * | odc joined #nim |
12:36:10 | Alpha1220 | yep, but it is written over there that |
12:36:23 | Araq | bodie_: unzip and run finish.exe |
12:36:33 | Alpha1220 | NOTE Error handling in Swift resembles exception handling in other languages, with the use of the try, catch and throw keywords. Unlike exception handling in many languages—including Objective-C—error handling in Swift does not involve unwinding the call stack, a process that can be computationally expensive. As such, the performance characteristics of a throw statement are comparable to those of a return statement. |
12:36:47 | Araq | it installs mingw for you and works out of the box. |
12:37:25 | Araq | Alpha1220: that's just an implementation detail / performance characteristic. the import part here is that throws funcs do auto-throw when then call throws funcs |
12:37:37 | Araq | *when they call |
12:37:51 | bodie_ | hm |
12:38:14 | bodie_ | so I guess threading on windows depends on pthread? |
12:39:02 | Araq | Alpha1220: in other words, the stack unwinding exists and is implicit. like in any other exception handling model. |
12:39:04 | bodie_ | I'm not comfy w/ using mingw for windows native. I realize this is not an issue for everyone |
12:39:15 | bodie_ | how big of a pain is it to set up for msvc? |
12:39:26 | bodie_ | or is it just a "just generate the C and DIY" |
12:39:36 | Araq | edit the nim.cfg; cc = vcc |
12:39:37 | bodie_ | alternatively, maybe can it be done using a nimscript build? |
12:39:41 | Araq | that's it. |
12:39:46 | bodie_ | that's nice |
12:39:53 | * | Senketsu_ quit (Quit: WeeChat 2.1) |
12:39:59 | bodie_ | so it doesn't depend on pthread? |
12:40:00 | Alpha1220 | BTW are the plans for making seqs and strings default to empty instead of nil in plans for v1? That is the number 1 reason for my code crashes. |
12:40:14 | FromGitter | <arnetheduck> funny enough, swift offers both ways of handling them as well, they have a `try?` operator to turn an exception into a nil value |
12:40:51 | * | simonsolnes quit (Ping timeout: 255 seconds) |
12:42:01 | * | Senketsu_ joined #nim |
12:42:54 | bodie_ | one of my bigger gripes with Rust is how people have written crates that have hard dependencies on a gnu build environment |
12:42:57 | Alpha1220 | I would seriously prefer rust like `?` and Result for error handling but well idk how well it would work with overloaded operators.. Anyone with experience in Rust who can shed some light? |
12:43:42 | bodie_ | I like the ? macro |
12:44:02 | bodie_ | I don't like the ergonomics of Result and Option very much |
12:44:03 | * | Senketsu_ quit (Client Quit) |
12:44:19 | bodie_ | it's better than nothing, but at the end of the day I think Go's solution is simpler |
12:44:54 | bodie_ | checking a value in a boolean expression is simpler than pattern matching, especially with inner values |
12:45:16 | bodie_ | that doesn't mean result / option aren't _better_ but _simplicity_ is a big facet of usability |
12:45:23 | bodie_ | personal opinion here |
12:46:16 | bodie_ | I'd love it if Go had some kind of macro for eliding the boilerplate of error checking though |
12:47:08 | bodie_ | maybe something like "try" without the runtime semantics of exceptions.... |
12:47:46 | Araq | Alpha1220: yup, planned for v1. |
12:50:04 | * | Alpha1220 quit (Ping timeout: 260 seconds) |
12:50:19 | bodie_ | do you know whether there's a nanogui binding for nim? |
12:50:40 | FromGitter | <mratsim> by the way @alehander42 what’s the rationale for using urandom instead of random? |
12:51:55 | * | xkapastel joined #nim |
12:52:40 | FromGitter | <mratsim> @Alpha1220, why would it be a problem for overloading? |
12:53:31 | FromGitter | <alehander42> @mratsim well, I think I just thought nim-random is a richer lib than the builtin random module |
12:53:50 | FromGitter | <mratsim> `.` being overloadable today is a an issue granted but I think ? being overloadable is fine, some libraries might return multiple error types and you can always dispatch on type |
12:54:17 | FromGitter | <mratsim> ah, so it’s nim-random that pulls the random number from /dev/urandom |
12:54:20 | FromGitter | <alehander42> but I guess `/dev/urandom` is more useful, as it always returns stuff (it doesn't block: the bug you encountered was just related to io bug in older version of the lib I forgot to update) |
12:55:16 | FromGitter | <alehander42> and I didn't really analyze e.g. how crypto-reliable would it be, as I just needed relatively random values for tests |
12:55:43 | FromGitter | <alehander42> as a whole, I intended to add some additional random sources and a way to tweak what distribution you want |
12:55:54 | FromGitter | <alehander42> but I haven't had a usecase for that yet |
12:56:16 | FromGitter | <mratsim> "Warning: Package 'quicktest' has an incorrect structure. The top level of the package source directory should contain at most one module, named 'quicktest.nim', but a file named 'new.nim' was found. This will be an error in the future.” just another day in nimble lol |
12:56:17 | FromGitter | <alehander42> (at least I think i've seen this kind of hooks in other libs) |
12:56:38 | FromGitter | <alehander42> ah this is real, I should remove this file :D |
12:56:41 | FromGitter | <mratsim> For me I just want the test to finish fast |
12:56:46 | Araq | for me their '?' macro smells like they really want a short notation to pass errors up the call stack. Which is what exceptions do with an even shorter notation. |
12:57:06 | FromGitter | <mratsim> ^ |
12:57:30 | Araq | you can argue all day long that this single character makes software more reliable in the greater scheme of things. |
12:57:37 | FromGitter | <arnetheduck> Araq, `?` is visible, nothing is not |
12:58:01 | Araq | yeah here we go. |
12:58:14 | FromGitter | <narimiran> ? can be omitted, nothing can't :P |
12:58:21 | FromGitter | <arnetheduck> it's the fact that you actively have to put it there to appease the compiler that makes the difference |
12:58:22 | Araq | at some point the ? is just noise in the code |
12:58:34 | Araq | you write it down without thinking. |
12:58:37 | * | alpha1220 joined #nim |
12:58:45 | Araq | and that's exactly what you wanted to avoid in the first place. |
12:59:08 | bodie_ | any code which can result in an error value should simply be a compile error :) |
12:59:10 | FromGitter | <arnetheduck> and that's where nim can do better - you can do a `check` block for example |
12:59:33 | FromGitter | <alehander42> what is `check` block? |
12:59:33 | Araq | you can't force "make me think about error handling" into programmers, they will do anything to avoid it. |
12:59:44 | shashlick | Araq: is https://github.com/nim-lang/Nim/pull/7677 ready to go? |
12:59:47 | FromGitter | <arnetheduck> so you already made this choice and argument with `discard` - how is this different? |
12:59:51 | FromGitter | <mratsim> Ah one thing, I’d like a fast_finish option so that it stops on first fails. Or give a summary of one example failing case and the number of failures. Otherwise it’s spamming the stdout. |
13:00:13 | alpha1220 | Well, for me the biggest advantage of ? is mental peace. I know which functions can return error and I can put a question mark on each function call. I hate nested try-catch-finally blocks. |
13:00:49 | FromGitter | <arnetheduck> Araq, of course you can.. if people have to pay 10c for getting a plastic bag, they'll bring their own.. even if they earlier paid the same 10c indirectly |
13:01:15 | FromGitter | <mratsim> raises: [] might help @alpha |
13:01:21 | FromGitter | <mratsim> though it’s longer to write than ? |
13:01:42 | Araq | the granularity is much better, one .raises vs 1000s of ?s |
13:01:51 | * | alpha1220_ joined #nim |
13:01:52 | FromGitter | <krux02> Can someone tell the "Ron" in the comment section of this article, that references are nothing but hidden pointers and can as well be null. http://etodd.io/2017/03/29/thirteen-years-of-bad-game-code/ |
13:02:02 | * | simonsolnes joined #nim |
13:02:20 | FromGitter | <krux02> I can't login |
13:02:25 | FromGitter | <arnetheduck> @alehander42 `check` block would be the equiv of `?`, but for a series of calls that return errors, so you don't have to litter the code |
13:03:26 | codevantage | krux *gasp* someone is wrong on the internet XD |
13:03:27 | alpha1220_ | mratsim Araq, that is the point. If you have Result, you are forced to use ? to unwrap. But no-one is forced to write raises:[], I am sure not even the stdlib uses it consistently, neither do any nimble package. So saying that raises:[] can do it is actually useless if people rarely use it. |
13:03:44 | FromGitter | <mratsim> check block in the wild: https://github.com/status-im/nim-mpint/blob/master/tests/test_comparison.nim#L22 |
13:04:11 | FromGitter | <mratsim> yes but you are still forced to handle the exception |
13:04:18 | FromGitter | <mratsim> while you can discard Result or Status code |
13:04:39 | * | alpha1220 quit (Ping timeout: 260 seconds) |
13:05:04 | FromGitter | <alehander42> @arnetheduck but if I have a serie of calls, it's very probable that some of them will not return errors |
13:05:19 | FromGitter | <mratsim> anyway, for numerical computing Result and Error code are a no-go, for stuff like IO, networking so much things can fail exceptions are not suitable. Plus you need to recover |
13:05:22 | FromGitter | <alehander42> it's a very specific syntax optimization |
13:05:52 | FromGitter | <alehander42> `f?` seems better, as it doesn't make you remember two different syntaxes for the same thing |
13:06:03 | Araq | alpha1220_: so let's fix the stdlib and see how to patch selected Nimble packages. |
13:06:27 | Araq | then we can say from experience that Nim's approach sucks and we should abandon it. |
13:06:34 | * | ieatnerds quit (Remote host closed the connection) |
13:06:54 | FromGitter | <krux02> @mratsim numerical computations have NaN, which is basically a monad around the error case |
13:06:58 | * | ieatnerds joined #nim |
13:07:00 | FromGitter | <arnetheduck> Araq, to know where to fix, the compiler has to tell you.. that's why we're having this discussions |
13:07:02 | FromGitter | <krux02> it just doesn't tell you the error |
13:07:08 | Araq | heck, I don't even like exceptions and yet I think it's too early to throw them away. |
13:07:26 | Araq | arnetheduck: the compiler DOES tell you. |
13:07:36 | FromGitter | <krux02> Araq: don't even think about throwing them away. |
13:07:51 | FromGitter | <krux02> but I would like to have the stack upside down |
13:07:58 | FromGitter | <mratsim> a queue? |
13:08:02 | FromGitter | <krux02> the way Nim puts the stack confuseses me |
13:08:14 | codevantage | why not have both? |
13:08:34 | FromGitter | <mratsim> “There is a macro for that”™ |
13:08:42 | FromGitter | <arnetheduck> Araq, if the compiler told you (as a requirement) they would be there |
13:08:55 | FromGitter | <krux02> there is not a macro for everything |
13:09:00 | FromGitter | <krux02> and macros have disadvantages |
13:09:04 | * | ieatnerds quit (Remote host closed the connection) |
13:09:07 | FromGitter | <mratsim> it was a joke ;) |
13:09:24 | FromGitter | <krux02> for example I can't use the ast-pattern-matching macro to write the ast-pattern-matching marco |
13:09:28 | * | ieatnerds joined #nim |
13:10:24 | alpha1220_ | Araq: On another note, why are object variants so clumsy to use and why is something like Patty not considered as part of the language? |
13:10:28 | codevantage | if exceptions could work in exactly the same way, then this would be just an implementation detail |
13:11:13 | Araq | alpha1220_: because I'm an idiot. next question. |
13:11:23 | Araq | :P |
13:11:24 | FromGitter | <alehander42> yeah, I also love the variant definitions of Patty :D |
13:11:38 | * | Snircle joined #nim |
13:11:57 | FromGitter | <alehander42> they also match very well with @krux02's pattern macthing |
13:12:01 | FromGitter | <krux02> Araq: You just insulted an important Member of the Nim community. Please excuse yourself. |
13:12:09 | alpha1220_ | Come on, can we do this for 1.0? @Araq |
13:12:24 | alpha1220_ | It will make nim a lot more pleasant than it is now |
13:12:29 | Arrrr | Wasn't patter matching for case objects planned before 1.0? |
13:12:40 | alpha1220_ | and it goes together with the expressive and concise mantra of Nim |
13:12:46 | FromGitter | <krux02> alpha1220_: can you integrate Patty with ast_pattern_matching? |
13:12:51 | * | fredrik92 joined #nim |
13:13:52 | Araq | what you're describing here are the super negative aspects of an overly long horrible amateurish development process |
13:14:07 | alpha1220_ | krux02, tbh I have never used macros, never needed them, so no I can't integrate them as of yet |
13:14:31 | Araq | so v1.0 is at the same time overdue and yet obviously not perfect. |
13:14:53 | alpha1220_ | less amateurish than me. I never completed a project. Actually never did more than 1 month work on any project before abandoning it. |
13:14:55 | FromGitter | <krux02> alpha1220_: It is time that you do it. In my opinion the most important feature of Nim. You can't just dismiss it. |
13:16:07 | Araq | all we can do is either delay v1.0 by another 5 years or release what we have and pleasently surprise you by a v2.0 that rocks. |
13:16:17 | * | couven92 quit (Ping timeout: 248 seconds) |
13:16:37 | Araq | the successful software project all seem to do the latter. |
13:16:38 | FromGitter | <alehander42> @krux02 my long term hope was that Patty's variant etc macros and ast_pattern_matching more general `match` macros will be combined in the stdlib :D |
13:17:03 | codevantage | keep nim backwards compatible pls |
13:17:28 | alpha1220_ | krux02: I would love to but you know where I live, nearly all jobs are on android/ios/web so even though I dislike all of them, yet I have to focus on them for the time being (as college time is gonna finish soon. So very little time to play around with Nim and the likes. |
13:17:56 | FromGitter | <krux02> @alehander42 I dismissed Patty pretty quickly, because I saw that it could not do ast pattern matching and was also not designed to do so. |
13:18:06 | FromGitter | <narimiran> if only all this energy were directed towards closing the bugs.... ;) |
13:18:16 | FromGitter | <ephja> will more cash end up in the hands of zah at some point? 😄 |
13:18:22 | FromGitter | <mratsim> 50 bugs closed in the past week |
13:18:38 | FromGitter | <alehander42> @krux02 otherwise I think patty and ast_pattern.. 's matching dsl-s look relatively similar |
13:18:39 | FromGitter | <narimiran> @mratsim those were mostly duplicates, from what have i seen.... |
13:18:57 | Araq | mratsim: closed, but "fixed" is another topic. |
13:19:00 | FromGitter | <mratsim> btw, is there a way to have nimble task only dependencies? |
13:19:02 | FromGitter | <narimiran> but nonetheless i was very pleasantly surprised to see the number go below 1300 |
13:19:16 | FromGitter | <mratsim> I’d like to add quickcheck as a dependency but only for testing |
13:19:22 | FromGitter | <narimiran> yeah, should have said 'fixed' above |
13:19:41 | FromGitter | <alehander42> I think with a bit of work one could adapt the patty API to work well for the ast, but I just decided your lib has implemented more of the matching logic |
13:19:44 | alpha1220_ | Araq: Well I have no problems waiting for v2 since it is just a number but well if you change it too much either you are gonna break everything or nim is gonna be the big mess that is c++. On the other hand, languages like Rust changed rapidly before 1.0 and no one complained (Yeah it had mozilla and that is one of the reasons but still.) |
13:20:22 | FromGitter | <mratsim> no one complains, not sure, it’s a mess with the #[cfg(features)] flag right now |
13:20:30 | FromGitter | <mratsim> or whatever it is |
13:20:31 | alpha1220_ | BTW any plans for forming an organization around Nim and raise financial support so that there can be more official full time developers? |
13:20:39 | FromGitter | <mratsim> lots of old library only compile for Rust nightly |
13:21:20 | alpha1220_ | The only complaints are regarding the over usage of nightly. But that is mostly for newer features. Breakages are pretty much uncommon in Rust atm. |
13:22:16 | FromGitter | <krux02> @alehander42 surely patty and ast_pattern_matching looks similar, structurally they are very different. |
13:22:36 | FromGitter | <krux02> Patty can only match very simple patterns |
13:23:28 | FromGitter | <alehander42> @krux02 exactly, I am talking about its "planned" API: (things that do not work yet) |
13:23:56 | FromGitter | <krux02> and I suspect that not including complexer patterns already made that library not forward compatible (there need to be breaking changes to generalize it) |
13:24:29 | Araq | alpha1220_: plans for this are ongoing, yes. |
13:24:44 | Araq | in fact, see you later. |
13:25:39 | alpha1220_ | Oh great! |
13:26:44 | FromGitter | <alehander42> @krux02 one "future" example in patty I like is custom matchers: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5adf30941130fe3d360f4403] |
13:27:39 | FromGitter | <alehander42> hm actually that's not a custom mactcher |
13:28:40 | FromGitter | <krux02> that is just impossible to support in that notation. |
13:29:06 | FromGitter | <krux02> Patty is not a general pattern matching library |
13:29:10 | FromGitter | <alehander42> anyway, still one could imagine similar custom matchers, e.g. ⏎ ⏎ macro myWeirdMatch(..): ⏎ # generates a condition and error handler ⏎ ... [https://gitter.im/nim-lang/Nim?at=5adf31265d7286b43a616a3e] |
13:29:16 | FromGitter | <alehander42> oh man wtf gitter |
13:29:26 | FromGitter | <krux02> Patty is a single level object variant matcher |
13:30:06 | FromGitter | <alehander42> I am talking about the original idea behind patty(which seems not implemented) https://github.com/andreaferretti/patty#things-that-do-not-work-yet |
13:30:34 | FromGitter | <alehander42> otherwise yeah, the syntax in the example is not so important, ignore this example |
13:30:48 | FromGitter | <krux02> If it would claim to be exactly that, I would not have any complains, but it sounds like it is pattern matching, but it is not, it is just a specific use case of it. |
13:31:39 | FromGitter | <alehander42> actually it even had the some plan for guards as yours `Circle(x: x, y: y, r: r) if r < 0:` |
13:31:45 | FromGitter | <krux02> Scala has a very neat way to do custom matchers |
13:32:17 | FromGitter | <alehander42> as I said, if it had all features implemented, it would be reasonably patter matcher |
13:32:24 | FromGitter | <alehander42> oh, what does scala do? |
13:33:01 | codevantage | does nim have a roadmap? |
13:33:33 | FromGitter | <krux02> scala has ``def unapply(object: S): Option[T]`` |
13:33:49 | FromGitter | <narimiran> codevantage: making a roadmap is on the roadmap :P |
13:33:52 | FromGitter | <krux02> when you implement that for your type T, then this function will be called |
13:34:22 | FromGitter | <mratsim> there used to be a TODO.md |
13:34:44 | FromGitter | <krux02> it should return either the matched object or `None` |
13:34:46 | FromGitter | <mratsim> it has been changed to RFCs. But there is still a Things for V1 document |
13:34:59 | * | alpha1220_ quit (Ping timeout: 260 seconds) |
13:35:06 | FromGitter | <krux02> and it get's an object, which is basically RootObj |
13:35:25 | * | codevantage quit (Read error: Connection reset by peer) |
13:35:56 | * | codevantage joined #nim |
13:36:48 | FromGitter | <krux02> wait, my memory is weakening |
13:36:54 | FromGitter | <krux02> here is an article: http://danielwestheide.com/blog/2012/11/21/the-neophytes-guide-to-scala-part-1-extractors.html |
13:38:48 | codevantage | so no more todo ~ |
13:39:35 | FromGitter | <krux02> codevantage: nim as bugs |
13:39:43 | FromGitter | <krux02> just check the issues list. |
13:39:56 | FromGitter | <krux02> codevantage: I think one item on the TODO list is concepts. |
13:40:00 | FromGitter | <krux02> I don't like them |
13:40:43 | codevantage | i think concepts works well with nim |
13:40:56 | FromGitter | <krux02> I disagree |
13:41:00 | codevantage | especially with the ufc |
13:41:06 | FromGitter | <krux02> ufc? |
13:41:12 | FromGitter | <ephja> what else? |
13:41:15 | codevantage | unified fuction call |
13:41:31 | FromGitter | <krux02> that is great, yes. |
13:41:40 | FromGitter | <krux02> but for my code I am much better off not using concepts |
13:41:40 | codevantage | maybe im getting the acronym wrong |
13:41:59 | FromGitter | <krux02> I also get compilation errors, the same was as if i would use concepts |
13:42:06 | FromGitter | <krux02> just that I don't need to deal with concepts. |
13:43:07 | codevantage | concepts are like contracts |
13:43:37 | codevantage | i feel |
13:45:53 | shashlick | has strutils.escape been deprecated? |
13:48:27 | codevantage | concepts are nice to work with already existing code |
13:50:50 | FromGitter | <krux02> codevantage: don't do too much with it. They are experimental and it is very likely that the syntax changes. |
13:51:07 | FromGitter | <krux02> shashlick: just look it up |
13:51:46 | shashlick | Found the PR, there's no replacement yet though |
13:52:06 | FromGitter | <ephja> wasn't it possible to have multiple statements in a => lambda |
13:52:11 | FromGitter | <krux02> it is deprecated |
13:53:36 | codevantage | krux i just use them as a way to ensure that only certain types interact with my procs. if i wanted to do it another way id have to spend a lot more time |
13:55:17 | FromGitter | <alehander42> @krux02 *very likely* |
13:55:26 | codevantage | beside i just wanted to experiment with it, i think its a good match for the problem |
13:57:45 | FromGitter | <krux02> @alehander42 The current concept implementation confuses type expressions with value expressions. |
13:58:07 | FromGitter | <krux02> to disambiguate them, the syntax has to be changed in a breaking way. |
13:58:25 | * | SenasOzys quit (Ping timeout: 248 seconds) |
14:00:59 | FromGitter | <krux02> the concept declaration "dynamically" decides if something is meant to be a type or a value. |
14:01:06 | * | nsf quit (Quit: WeeChat 2.0.1) |
14:01:34 | * | leorize quit (Ping timeout: 265 seconds) |
14:03:37 | codevantage | oh not goof |
14:04:07 | codevantage | then ill have to add checks or use patterns |
14:05:28 | * | SenasOzys joined #nim |
14:07:15 | * | athenot_ quit (Remote host closed the connection) |
14:07:35 | * | athenot joined #nim |
14:09:44 | FromGitter | <krux02> attempt to call undeclared routine 'inline' |
14:10:01 | FromGitter | <krux02> am I now supposed to delete all my inline? |
14:13:41 | * | leorize joined #nim |
14:17:45 | FromGitter | <alehander42> the concept syntax is a long topic , I don't have time to discuss it, but it works well for me |
14:19:00 | * | ftsf joined #nim |
14:20:12 | ftsf | dom96, choosenim release binary on windows detected as having a trojan "Trojan:Win32/Tiggre!plock" probably a false positive but might be worth looking into? |
14:21:21 | * | rockcavera quit (Ping timeout: 248 seconds) |
14:27:12 | FromGitter | <mratsim> @alehander42 congrats quickcheck helped me detect aliasing issues that only occurs in release mode: https://github.com/status-im/nim-mpint/issues/23 |
14:33:32 | FromGitter | <alehander42> @mratsim awesome, I'll try to fix the uint arg thing and the output until tomorrow when I have more time |
14:36:44 | * | endragor_ quit (Remote host closed the connection) |
14:40:46 | FromGitter | <mratsim> actually it’s Nim that has a bug? or C |
14:49:25 | FromGitter | <mratsim> it’s the -O3 optimization of Clang that was generating the issue |
14:49:37 | FromGitter | <mratsim> test case: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5adf44002dfcfffd2b2cb164] |
14:50:42 | FromGitter | <mratsim> -O2 gives the same too by the way |
14:51:11 | FromGitter | <diegogub> Is it possible to go from string to enum? |
14:52:10 | FromGitter | <alehander42> weird, gcc does this for me too |
15:01:36 | * | CodeVantage_ joined #nim |
15:03:37 | * | user1101 quit (Quit: user1101) |
15:04:17 | * | miran joined #nim |
15:05:36 | * | cspar joined #nim |
15:06:42 | * | codevantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
15:06:53 | * | CodeVantage_ quit (Quit: Leaving) |
15:07:07 | * | CodeVantage joined #nim |
15:10:40 | FromGitter | <krux02> @diegogub: converting an enum to string is easy, so it is pretty easy to create a Table to do the inverse. |
15:11:04 | FromGitter | <diegogub> @krux02 ow, good idea..thanks |
15:15:32 | ftsf | isn't there already parseEnum? |
15:16:11 | ftsf | diegogub: https://nim-lang.org/docs/strutils.html#parseEnum,string |
15:18:58 | * | leorize quit (Ping timeout: 248 seconds) |
15:20:18 | FromGitter | <krux02> parseEnum does not use a table |
15:20:26 | FromGitter | <krux02> but yes you are right I did not know it |
15:24:58 | * | cspar quit (Ping timeout: 264 seconds) |
15:28:59 | FromGitter | <diegogub> @krux02 @ftsf I was trying to use it parseEnum..but it's not working..as I would expect |
15:29:20 | FromGitter | <diegogub> I have this enum: ⏎ """ ⏎ type FilterType = enum ⏎ CountryFilter = "Country" ⏎ DateFilter = "Date" ... [https://gitter.im/nim-lang/Nim?at=5adf4d4f2d0e228d7ba90536] |
15:29:51 | FromGitter | <diegogub> and doing parseEnumFilterType ("Country") |
15:30:13 | FromGitter | <krux02> do ``` around your code |
15:30:14 | FromGitter | <mratsim> that’s not an enum |
15:30:22 | ftsf | parseEnum[FilterType](input) |
15:30:23 | FromGitter | <mratsim> or can enum have string value? |
15:30:39 | FromGitter | <krux02> yes enum can have string values |
15:30:44 | * | cspar joined #nim |
15:30:45 | FromGitter | <mratsim> oh |
15:30:54 | ftsf | https://nim-lang.org/docs/manual.html#types-enumeration-types |
15:30:57 | FromGitter | <krux02> I wouldn't use it though |
15:30:59 | FromGitter | <mratsim> but $fooValue gives what in that case? |
15:31:17 | FromGitter | <diegogub> "Country" ⏎ @mratsim |
15:31:17 | shashlick | see how I've used parseEnum() here: https://github.com/genotrance/snip/blob/master/src/snip/keymap.nim |
15:32:43 | FromGitter | <krux02> I just found a bug |
15:32:53 | FromGitter | <diegogub> Im getting ValueError when using parseEnum with "Country" string |
15:33:00 | FromGitter | <diegogub> Exception |
15:33:35 | shashlick | parseEnum[FilterType]("CountryFilter") = FilterType.CountryFilter |
15:34:07 | shashlick | you can get the enum from its name, you cannot get it from its value I don't think |
15:34:35 | FromGitter | <diegogub> I see, what I'm using is a case like : |
15:35:03 | FromGitter | <diegogub> ```case "Country": ⏎ of $CountryFilter: ⏎ return CountryFilter ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5adf4ea7109bb04332f7569c] |
15:36:17 | FromGitter | <krux02> I just need to look at strutils and I see bugs everywhere |
15:36:33 | FromGitter | <krux02> use the strutils package to sprinkle bugs in your codebase |
15:36:48 | * | simonsolnes quit (Ping timeout: 255 seconds) |
15:38:24 | FromGitter | <diegogub> @krux02 I'm using it a lot, let know if I can help you |
15:38:42 | FromGitter | <krux02> well, write your own version of it that does not have bugs in it. |
15:38:50 | FromGitter | <krux02> it's a horrible mess. |
15:39:40 | * | athenot quit (Read error: Connection reset by peer) |
15:39:42 | FromGitter | <krux02> strutils.escape should have been called "putRandomReversableEscapeCharacters" |
15:39:50 | * | athenot_ joined #nim |
15:40:13 | FromGitter | <diegogub> haha would be a very good crash course to nim |
15:40:24 | FromGitter | <krux02> strutils.cmpIgnoreStyle was designed to match nim.s style insensitive identifier matching |
15:41:44 | FromGitter | <krux02> but because that equality behavior changed and cmpIgnoreStyle did not adopt that new behavior because beckwards compatibility, cmpIgnoreStyle is now just useful for nothing and all code that is written for identifier matiching like in nim is wrong |
15:43:55 | * | Trustable joined #nim |
15:44:39 | * | ieatnerds quit (Quit: Leaving) |
15:47:23 | FromGitter | <krux02> https://github.com/nim-lang/Nim/issues/7686 |
15:48:21 | * | PMunch quit (Quit: Leaving) |
15:55:40 | dom96 | ftsf: choosenim embeds a binary as static data so that's probably why. Many antiviruses consider that suspicious. |
15:57:27 | shashlick | how's it going dom96, been a while |
16:00:12 | * | CodeVantage quit (Read error: Connection reset by peer) |
16:02:21 | shashlick | did someone break the build? my PR is suddenly failing on a line I didn't change |
16:02:26 | * | Arrrr quit (Quit: Leaving.) |
16:03:22 | * | athenot joined #nim |
16:04:43 | * | simonsolnes joined #nim |
16:06:30 | * | athenot_ quit (Ping timeout: 255 seconds) |
16:09:47 | * | CodeVantage joined #nim |
16:09:57 | * | CodeVantage quit (Remote host closed the connection) |
16:10:11 | * | CodeVantage joined #nim |
16:11:50 | FromGitter | <krux02> shashlick is it a timeout? |
16:12:56 | shashlick | stack trace: (most recent call last) |
16:12:58 | shashlick | commands.nim(67) |
16:13:00 | shashlick | lib\pure\strutils.nim(2419) % |
16:13:02 | shashlick | lib\pure\strutils.nim(2362) addf |
16:13:04 | shashlick | lib\pure\strutils.nim(2304) invalidFormatString |
16:13:05 | * | CodeVantage quit (Client Quit) |
16:13:06 | shashlick | lib\pure\strutils.nim(2304, 3) Error: unhandled exception: invalid format string |
16:13:08 | shashlick | FAILURE |
16:13:10 | shashlick | Command exited with code 1 |
16:13:17 | * | CodeVantage joined #nim |
16:16:01 | FromGitter | <krux02> @diegogub: I told you strutils if full of bugs, do you see it? |
16:17:13 | * | NimBot joined #nim |
16:17:37 | FromGitter | <krux02> it is in strutils |
16:17:39 | FromGitter | <krux02> isn't it? |
16:19:27 | FromGitter | <data-man> @Araq @dom96 ⏎ In newer versions of SQLite was added so many new useful features. ⏎ If I add to updated wrapper something like ```when defined(useSQLiteNewApi)``` or ```when defined(useSQLiteApiVersionXXX)``` it will be ok? ⏎ A new API is needed for some of my new PRs. [https://gitter.im/nim-lang/Nim?at=5adf590f6d7e07082b2c0063] |
16:22:59 | * | ftsf quit (Quit: Leaving) |
16:24:24 | FromGitter | <mratsim> in before all Nim packages must be compiled with -d:useSQLiteNewApi —newruntime -d:fooSomething -d:whatAboutMe |
16:27:05 | * | CodeVantage quit (Ping timeout: 240 seconds) |
16:29:20 | FromGitter | <data-man> For Windows It would be preferable if SQLite will be updated in dlls.zip |
16:39:33 | * | natrys joined #nim |
16:42:20 | * | riidom joined #nim |
16:45:24 | * | codevantage joined #nim |
17:01:24 | * | athenot quit (Ping timeout: 255 seconds) |
17:14:15 | * | athenot joined #nim |
17:21:23 | * | endragor joined #nim |
17:25:53 | * | endragor quit (Ping timeout: 248 seconds) |
17:29:06 | Araq | data-man: fine with me |
17:30:15 | FromGitter | <data-man> Which variant? With NewApi or ApiVersion? |
17:33:40 | Araq | when not defined(onlyOldSqliteApi) |
17:41:27 | * | jrbrt joined #nim |
17:45:46 | * | SenasOzys quit (Remote host closed the connection) |
17:47:23 | * | Trustable quit (Quit: Leaving) |
17:54:19 | * | jrbrt quit (Quit: jrbrt) |
17:55:06 | FromGitter | <data-man> But ```onlyOldSqliteApi``` not defined by default. Need to add sqlite3.nim.cfg with this define? |
17:55:57 | * | jrbrt joined #nim |
17:57:06 | * | jrbrt quit (Client Quit) |
17:58:08 | * | nsf joined #nim |
17:58:18 | * | SenasOzys joined #nim |
17:59:01 | FromDiscord | <treeform> It looks like seq.add gets slower and slower as you add items too it. Where is this implemented? Does not appear that it is amortized? Is there an amortized version of seq.add? |
17:59:12 | FromDiscord | <treeform> Is this it? https://github.com/nim-lang/Nim/blob/8b0ea4b501125880bce54f20839b443973bba0c4/lib/core/seqs.nim#L70 |
18:00:07 | FromDiscord | <treeform> This has the funny side effect of making JavaScript version x1000 faster 😃 then C version. |
18:03:45 | Araq | treeform: it is amortized. |
18:05:47 | FromDiscord | <treeform> Where? |
18:06:04 | FromGitter | <data-man> @treeform: If you know the approximate number of items, then a preallocating will be faster. |
18:06:09 | FromDiscord | <treeform> I would expected it to be done on this line: |
18:06:11 | FromDiscord | <treeform> https://github.com/nim-lang/Nim/blob/8b0ea4b501125880bce54f20839b443973bba0c4/lib/core/seqs.nim#L66 |
18:06:16 | FromDiscord | <treeform> some thing like |
18:06:28 | FromDiscord | <treeform> if x.len >= x.cap: resize(x.len*2) |
18:06:57 | FromDiscord | <treeform> oh maybe its this line: https://github.com/nim-lang/Nim/blob/8b0ea4b501125880bce54f20839b443973bba0c4/lib/core/seqs.nim#L85 |
18:07:20 | FromDiscord | <treeform> data-man, yeah I don't know the size ahead of time. |
18:09:45 | FromGitter | <krux02> you all probably don't care about it at all, but I now have nice error messages like this generatey by my pattern mactichng library: http://ix.io/18Dm |
18:11:22 | Araq | https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim#L249 |
18:13:27 | Araq | krux02: I PM'ed you on gitter |
18:15:35 | FromGitter | <krux02> Araq: I PM'ed you back on gitter |
18:18:00 | FromDiscord | <treeform> it appears to be much faster to add to small seq, then its really slow to add to large ones |
18:18:19 | FromDiscord | <treeform> I could use seq of seq to speed it up maybe... like a rope |
18:20:05 | Araq | treeform: check the growth pattern please |
18:20:15 | FromGitter | <data-man> @Araq: In the current sqlite's wrapper functions look like this: ```proc sqlite3_xxxx(para1: someType, para2: someType, ...): someType``` ⏎ But c2nim starts the name of the parameter with 'a' and starts numbering for some reason from 2. ⏎ Maybe add a ```--paramsPrefix:PREFIX``` parameter to c2nim? |
18:20:25 | Araq | we can check V8 to see why it's much faster in JS land |
18:20:45 | * | natrys quit (Ping timeout: 264 seconds) |
18:21:05 | FromDiscord | <treeform> Araq, I am not sure what you want me to do? |
18:21:31 | FromDiscord | <treeform> I don |
18:21:57 | FromDiscord | <treeform> I don't understand how the code that you linked amortizes it. |
18:22:15 | Araq | treeform: make 'resize' output its values, perhaps |
18:22:33 | Araq | well it growths the seq by the factor of 1.5 |
18:26:07 | * | jrbrt joined #nim |
18:26:45 | Araq | data-man: sure but that's not important |
18:31:31 | FromDiscord | <treeform> Araq, I am probably not good enough at the optimizations. I think its some sort of cache locality thing. It amortizes fine but still slows down. I think I just ran the JavaScript thing wrong so it proved to be much faster, but it probably did not do the work it should have done. |
18:31:35 | * | cspar quit (Ping timeout: 240 seconds) |
18:32:24 | * | natrys joined #nim |
18:32:42 | FromDiscord | <mraxilus> does nim have go-like interfaces? those were great |
18:33:02 | FromGitter | <data-man> @Araq: For visual compatibility :) |
18:36:36 | Araq | mraxilus: "interfaced" Nimble package for now |
18:41:20 | * | smt` quit (Remote host closed the connection) |
19:00:14 | * | nsf quit (Quit: WeeChat 2.0.1) |
19:14:39 | * | natrys quit (Ping timeout: 260 seconds) |
19:14:57 | * | Jesin joined #nim |
19:15:07 | * | jrbrt quit (Quit: jrbrt) |
19:16:05 | * | Vladar quit (Quit: Leaving) |
19:16:56 | * | jrbrt joined #nim |
19:17:00 | * | jrbrt quit (Client Quit) |
19:25:22 | * | jjido joined #nim |
19:25:42 | * | jrbrt joined #nim |
19:28:17 | * | athenot quit (Read error: Connection reset by peer) |
19:31:21 | * | athenot joined #nim |
19:37:36 | * | endragor joined #nim |
19:42:22 | * | endragor quit (Ping timeout: 264 seconds) |
19:48:22 | * | Jesin quit (Quit: Leaving) |
19:52:43 | * | noonien quit (Quit: Connection closed for inactivity) |
19:52:49 | * | Sembei quit (Quit: WeeChat 2.2-dev) |
19:55:42 | * | Sembei joined #nim |
19:56:27 | * | natrys joined #nim |
19:56:51 | * | CodeVantage_ joined #nim |
19:58:10 | * | Sembei quit (Client Quit) |
19:59:00 | * | jrbrt quit (Quit: jrbrt) |
20:02:28 | * | rockcavera joined #nim |
20:16:21 | * | yglukhov quit (Remote host closed the connection) |
20:17:16 | * | Sembei joined #nim |
20:17:54 | * | rokups quit (Quit: Connection closed for inactivity) |
20:18:08 | * | Sembei quit (Client Quit) |
20:20:17 | * | Sembei joined #nim |
20:32:50 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:33:24 | * | Sembei quit (Quit: WeeChat 2.2-dev) |
20:34:07 | * | Sembei joined #nim |
20:36:49 | FromGitter | <data-man> @dom96: What do you think about #7549 ? Once Araq wrote that: ⏎ ⏎ > well it was a -1 from me, dom96 and data-man gave a +1 and so it's accepted ⏎ ⏎ So, if you like this idea, your "+1" will be decisive. Probably. :) ... [https://gitter.im/nim-lang/Nim?at=5adf95615f188ccc159d558d] |
20:38:40 | * | Sembei quit (Client Quit) |
20:40:51 | * | jrbrt joined #nim |
20:42:42 | * | Sembei joined #nim |
20:47:43 | * | Sembei quit (Quit: WeeChat 2.2-dev) |
20:48:41 | * | aziz joined #nim |
20:50:34 | * | CodeVantage_ quit (Quit: Leaving) |
20:53:21 | * | nsf joined #nim |
20:53:22 | * | miran quit (Ping timeout: 268 seconds) |
20:54:42 | * | aziz quit (Quit: Ex-Chat) |
20:55:24 | Araq | ah but that is different. I'll use my BDFL superpowers to prevent this from happening. |
20:55:27 | Araq | :P |
20:55:50 | * | Sembei joined #nim |
20:56:00 | Araq | we only add things to system that are useful. |
20:56:20 | Araq | and cannot be done elsewhere. |
20:56:43 | Araq | yes it's full of cruft because this policy is rather new. too bad for new features then. |
20:57:08 | Araq | the mistakes of the past don't justify new mistakes. |
20:58:22 | FromGitter | <data-man> Maybe add this to the algorithm module, at least? |
20:59:15 | FromGitter | <data-man> algosugar? :) |
20:59:32 | Araq | more like people_who_dont_understand_proc_pointer_syntax.nim ? |
21:02:52 | Araq | why not put your effort into making '->' part of system? (int, int) -> bool # binary integer predicate |
21:04:13 | FromGitter | <data-man> If we shall arrange voting, democracy will win? Or araqcracy will win? :-D |
21:04:37 | Araq | that depends on the topic. |
21:05:14 | Araq | we have a democracy here a la Ankh Morpork. |
21:05:56 | Araq | people get to vote and the most votes win. The only person who is allowed to vote is Araq. |
21:07:40 | FromGitter | <data-man> I did not read the 'Discworld' :( |
21:09:16 | Araq | well there are also movies and computer games about it. but the books are better. :-) |
21:10:20 | FromGitter | <alehander42> I watched a movie for one of the books |
21:10:31 | FromGitter | <alehander42> and it was very true to the original |
21:10:35 | FromGitter | <alehander42> down to dialog etc |
21:10:47 | FromGitter | <alehander42> and I hated it bec ause I already read the book, and it was just the same |
21:11:08 | FromGitter | <alehander42> so I guess that's a recomendation if you don't have time for any of the books :D |
21:11:50 | * | yglukhov joined #nim |
21:13:16 | FromGitter | <data-man> Other ideas for RFCs: ⏎ ⏎ 1) more flexible API for DB ⏎ 2) add API for the most popular key-value DBs ⏎ 3) multiple TLS/SSL backends for net (like cURL) [https://gitter.im/nim-lang/Nim?at=5adf9dec5d7286b43a63d989] |
21:16:03 | Araq | there are all Nimble package ideas, not nim RFCs. |
21:16:57 | FromGitter | <data-man> But net and db in the stdlib. |
21:19:41 | * | yglukhov quit (Remote host closed the connection) |
21:19:46 | Araq | and they suck |
21:19:57 | Araq | and need to be moved into nimble packages |
21:20:17 | * | yglukhov joined #nim |
21:20:58 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:22:47 | FromGitter | <data-man> New re with PCRE2? |
21:22:57 | * | CodeVantage_ joined #nim |
21:24:39 | * | yglukhov quit (Ping timeout: 255 seconds) |
21:32:05 | * | xet7 quit (Read error: Connection timed out) |
21:32:35 | * | xet7 joined #nim |
21:32:40 | * | CodeVantage_ quit (Quit: Leaving) |
21:35:12 | * | athenot quit (Remote host closed the connection) |
21:36:01 | * | athenot joined #nim |
21:44:08 | * | BitPuffin quit (Remote host closed the connection) |
21:46:27 | * | vlad1777d joined #nim |
21:48:57 | * | smt joined #nim |
21:49:56 | codevantage | araq you a diskworld fan? :D |
21:50:47 | * | xet7 quit (Read error: Connection timed out) |
21:51:35 | * | xet7 joined #nim |
21:52:46 | Araq | yes. |
21:53:20 | * | simonsolnes quit (Ping timeout: 276 seconds) |
21:55:22 | FromGitter | <data-man> DisCworld :-D |
21:59:12 | Araq | Nimworld |
21:59:40 | codevantage | why there not such a web sitw |
22:01:17 | FromGitter | <data-man> I'm fan of 'The Wheel of Time'. Much cooler than 'The Lord of the Rings'. :-D |
22:06:53 | Araq | The Wheel of Time was too hard for me. that creepy fog that you have to fight constantly |
22:07:07 | FromGitter | <data-man> Thanks to Brandon Sanderson that he continued the great work of Robert Jordan. |
22:07:18 | Araq | graphics were good for its time though |
22:08:03 | codevantage | wheel of time? fog? what fog? |
22:08:14 | codevantage | isnt that another story? |
22:09:14 | FromGitter | <data-man> And I'm fan of Dan Simmons. :) |
22:09:26 | codevantage | so much classics |
22:12:12 | Araq | codevantage: wheel of time was also a game. |
22:13:40 | * | cspar joined #nim |
22:14:13 | codevantage | oh |
22:14:30 | codevantage | i thought it never happened |
22:14:42 | codevantage | iv never seen it here |
22:14:50 | codevantage | :( |
22:22:55 | * | jrbrt quit (Quit: jrbrt) |
22:23:53 | * | jrbrt joined #nim |
22:25:14 | codevantage | i think for v1 nim has to have a installer. |
22:25:30 | codevantage | i know we already got a system for that |
22:25:58 | codevantage | but id like to be able to download an installer from the website |
22:26:29 | * | CodeVantage_ joined #nim |
22:27:46 | * | codevantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
22:29:00 | Araq | CodeVantage_: what's wrong with unzip + finish or choosenim? |
22:30:01 | * | Sentreen quit (Quit: WeeChat 1.6) |
22:30:50 | CodeVantage_ | It's not one click install |
22:30:56 | CodeVantage_ | not noob friendly |
22:31:08 | Araq | I beg to differ. |
22:31:11 | CodeVantage_ | A small wizard |
22:31:22 | CodeVantage_ | it could set up docs |
22:31:26 | Araq | 1. there is no such thing as a "one click install" |
22:31:42 | CodeVantage_ | THere could be. |
22:31:44 | Araq | 2. finish.exe is a wizard, you need to double click it like any other installer.exe |
22:31:49 | CodeVantage_ | At least some walkthrough |
22:32:04 | Araq | did you run finish.exe? |
22:32:09 | CodeVantage_ | Yes. its a wizard. I was thinking something more graphical obv |
22:32:15 | CodeVantage_ | Yes Yes |
22:32:23 | FromGitter | <data-man> @CodeVantage: Are you a Windows user? :) |
22:32:25 | CodeVantage_ | I even ran koch boot |
22:32:26 | Araq | what's wrong with it. |
22:32:32 | CodeVantage_ | I is a windoz user |
22:32:49 | Araq | 'koch boot' is not in our installation instructions. |
22:32:59 | CodeVantage_ | Nothing, but I think an installer would be nicer. |
22:33:04 | Araq | follow the instructions please. and then come back and complain it's too hard. |
22:33:14 | CodeVantage_ | It is in the install file |
22:33:28 | CodeVantage_ | I did everything XD |
22:33:53 | Araq | seems more a documentation problem than a tool problem. |
22:34:06 | Araq | unzip, double click on finish.exe |
22:34:13 | Araq | that's the installation on Windows. |
22:34:23 | CodeVantage_ | Installation on Linux/UNIX |
22:34:24 | CodeVantage_ | ... |
22:34:24 | CodeVantage_ | Then run the following command:: |
22:34:24 | CodeVantage_ | sh build.sh |
22:34:30 | Araq | if you "did everything", then you did far too many unrequired steps |
22:34:38 | CodeVantage_ | I read install file |
22:34:54 | * | yglukhov joined #nim |
22:35:04 | CodeVantage_ | I ran koch cause I use a global nimcache |
22:35:06 | CodeVantage_ | And it broke |
22:36:56 | Araq | makes no sense |
22:36:58 | CodeVantage_ | nvm I read the instructions |
22:37:01 | CodeVantage_ | Everything seems find |
22:37:03 | CodeVantage_ | fine |
22:37:25 | Araq | we can give finish.exe a UI |
22:37:36 | CodeVantage_ | That's what I wanted |
22:37:51 | Araq | but if the instructions are to blame, it's futile work. |
22:38:06 | CodeVantage_ | And maybe finish could add nimble bin folder to path... In fact I'll go do that now |
22:38:21 | CodeVantage_ | I didn't read the right instructions |
22:38:29 | CodeVantage_ | Not the instructions fault :| |
22:40:33 | * | yglukhov quit (Ping timeout: 248 seconds) |
22:45:31 | FromGitter | <data-man> What dlls will be needed for UI? For what platforms? With what version of msvcrt? etc. :-D |
22:45:38 | * | CodeVantage_ is now known as CodeVance |
22:45:47 | CodeVance | ISn't there already iup |
22:45:48 | FromGitter | <dom96> We'll get a UI |
22:45:52 | CodeVance | there's also nigui |
22:46:01 | CodeVance | which is platform specific |
22:46:06 | CodeVance | windows and linux |
22:46:08 | FromGitter | <dom96> If nobody creates one I will once I'm using windows more again |
22:46:40 | FromGitter | <data-man> Maybe based on TUI? |
22:47:51 | Araq | I wrote one based on my libui |
22:48:23 | Araq | but it never made it into any release because it's problematic |
22:49:04 | Araq | to integrate the download loop into the UI's event loop is fragile |
22:49:31 | Araq | and an ugly wizard that works is better than a sexy one that hangs. |
22:49:43 | FromGitter | <data-man> So terminal's based is more preferable. |
22:50:11 | * | smt quit (Read error: Connection reset by peer) |
22:50:14 | Araq | well it's lipstick on a pig. |
22:50:28 | Araq | "preferable" by whom? by me? sure. |
22:50:38 | Araq | by our users? doubtful. |
22:50:56 | * | smt joined #nim |
22:51:18 | FromGitter | <data-man> With Ribbon UI :-D |
22:51:20 | CodeVance | Have you seen nigui? |
22:51:22 | * | ieatnerds joined #nim |
22:51:26 | ieatnerds | Hey! |
22:51:38 | * | natrys quit (Quit: natrys) |
22:51:41 | FromGitter | <data-man> Hi! |
22:52:29 | ieatnerds | Just a few questions as per usual I guess. or my company we have an in house database that we would like to encrypt. I just dont know how I'd go about that in nim. |
22:52:35 | ieatnerds | for* |
22:52:36 | Araq | data-man: use the Win API directly for it, maybe. |
22:53:20 | Araq | might give us the start for our own libui without its annoying dependencies |
22:55:19 | FromGitter | <dom96> Araq: can you think of pathological behaviour that could be used to make Nim's collector unreliable, or should I suggest Nim to this person? https://www.reddit.com/r/programming/comments/8edblq/rust_at_chucklefish_pdf/dxuvdfb :) |
22:56:15 | FromGitter | <dom96> FWIW my plan is to use the winapi directly. I have an interesting project idea actually |
22:56:40 | Araq | well you have to avoid cycles like in Rust. and then Nim's GC is *better* for games because it's incremental. |
22:57:10 | Araq | ok, maybe not better, but different. |
22:57:23 | Araq | depends on the involved data structures. |
22:58:13 | shashlick | Why not just use nsis |
22:58:30 | CodeVance | Araq nigui already uses the win api directly |
22:58:46 | FromGitter | <data-man> @ieatnerds: You can try https://github.com/sqlcipher/sqlcipher |
22:58:49 | Araq | as I keep telling you, I don't dislike GCs for their speed or lack of realtime-ness |
23:00:20 | Araq | I dislike them because they tend to lure you into bad designs and because they make interop with other systems harder |
23:01:52 | Araq | shashlick: nsis sucks, that's why. been there, done that. |
23:02:07 | ieatnerds | Thanks data-man! |
23:02:10 | Araq | CodeVance: what? huh? where? |
23:03:00 | CodeVance | https://github.com/trustable-code/NiGui/blob/master/src/nigui/private/windows/platform_impl.nim |
23:03:06 | CodeVance | and gtk for linux |
23:03:41 | shashlick | No doubt, but just for the UI q&a, everything else can use choosenim + finish |
23:04:07 | CodeVance | tell me about choosenim |
23:04:19 | CodeVance | Cause I haven't used it yet |
23:04:30 | shashlick | It's good but does only 32 bit |
23:04:59 | CodeVance | nigui? |
23:05:13 | CodeVance | I use it |
23:05:21 | CodeVance | I'm 64 |
23:05:45 | shashlick | No choosenim |
23:06:10 | Araq | you're the oldest Nim user then here. |
23:06:10 | FromGitter | <data-man> @ieatnerds: Note: you will need to wrap several functions from sqlcipher's header. |
23:07:03 | CodeVance | Araq, lol |
23:08:01 | FromGitter | <mratsim> Trivia, Arraymancer’s releases are named after Fantasy books: https://github.com/mratsim/Arraymancer/releases/tag/v0.2.0 |
23:08:06 | ieatnerds | @data-man: I'm well aware. I'm not really worried about that. I've just never actually had to work on cryptographic things before. So I feel a bit lost on where to start. |
23:08:21 | FromGitter | <mratsim> Don’t do your own crypto |
23:08:37 | ieatnerds | I'm also aware of that. |
23:09:08 | CodeVance | 1st rule of crypto |
23:09:10 | FromGitter | <mratsim> well it’s fine to implement something following specs, but don’t create your own crypto scheme. |
23:09:34 | FromGitter | <mratsim> encrypting databases is a mess by the way. |
23:09:47 | tersec | mratsim: I understand that as guidance in general, but usually it's provided to people writing in a language with a wider set of pre-existing crypto libraries. |
23:10:03 | FromGitter | <mratsim> I worked with an encrypted database while in a Swiss bank … it’s super painful to deal with. |
23:10:08 | tersec | And even following specs can be hard with crypto, because of timing sidechannels, etc. |
23:10:19 | * | cspar quit (Ping timeout: 260 seconds) |
23:10:47 | tersec | There's also some irony in that for a language the choice of stdlib crypto of which amounts to ... md5 and sha1. |
23:10:52 | FromGitter | <mratsim> Try to find an encrypted database library in C, and wrap that. |
23:11:12 | ieatnerds | I'm just trying to stop us from have plain text csv files with client info. My boss has a few things he wants that no already-out-there solution offers, which is why were doing an in house thing. |
23:11:22 | FromGitter | <mratsim> For crypto in any case, feel free to use nimcrypto: https://github.com/cheatfate/nimcrypto |
23:11:31 | tersec | Sure, that's an especially tricky use case (as is anything where "encrypted" data has to be semi-online/live). |
23:11:48 | FromGitter | <mratsim> We’ll have it security audited at Status. |
23:11:58 | FromGitter | <mratsim> and it will be supported long-term |
23:12:21 | ieatnerds | @mratsim: Nice! |
23:12:25 | tersec | IIRC that has sha2, sha3/keccak (which, sure, Ethereum, so), and some other more modern algos? |
23:13:04 | ieatnerds | @tersec: Like I've said, I just dont know where to start. Luckily it's on the back burner so I have time to work on it. |
23:13:49 | FromGitter | <mratsim> the focus is on Ethereum crypto graph, including keyfiles (pbkdf2). |
23:14:08 | * | cspar joined #nim |
23:14:08 | FromGitter | <mratsim> cryptography* |
23:14:38 | tersec | ieatnerds: I guess structurally the trickiest thing I find about crypto stuff is the same as security stuff -- failure can't just be unit/integration/etc tested for. Failure's silent and commonly caused by intelligent, malicious actors. |
23:14:54 | FromGitter | <data-man> @Araq: Is NiGui a good candidate for inclusion to the stdlib? |
23:15:18 | Araq | no, but finish.nim is allowed to have nimble package dependencies |
23:16:58 | tersec | mratsim: is there any movement towards at least maybe replacing (there's good reason to have e.g., some crypto hashes in a stdlib, I'd claim) to replace md5 and sha1? |
23:17:23 | tersec | Or desire/willingness on your/Araq/Status's/etc part |
23:18:22 | FromGitter | <mratsim> Once that is sorted: https://github.com/nim-lang/Nim/issues/7337 |
23:18:29 | FromGitter | <data-man> It would be ideal to update wrapper for IUP and to write a convenient high-level API for it. :) |
23:19:09 | CodeVance | is there a zen of nim? |
23:19:11 | tersec | mratsim: looks promising, would like to see that |
23:19:14 | shashlick | nimgen it |
23:19:49 | FromGitter | <data-man> @shashlick: For what? |
23:20:02 | shashlick | So that updates are almost automatic |
23:20:35 | * | yglukhov joined #nim |
23:21:05 | FromGitter | <mratsim> @shashlick, the only issue I have when browsing your nimgen libraries is that I don’t see the proc and types that I will get :/ |
23:21:23 | shashlick | That's next on my to-do |
23:21:35 | shashlick | There's too many fun projects in Nim land |
23:21:42 | shashlick | Now I feel like making an installer |
23:22:40 | shashlick | Spring cleaning so fixed some defects |
23:22:57 | FromGitter | <data-man> IUP's API is very big. gl, scintilla, lua, image tools, OLE, plotting, web, ... What to exclude? |
23:22:58 | Araq | mratsim: I thought this RFC will be superseeded by "we use this in production now, can't be bad for the stdlib to adopt it as the standard" |
23:23:45 | shashlick | Given its already been wrapped in the past, should be easier to follow that right? |
23:24:24 | ieatnerds | Thank you all for the help, Time to do some(a lot) of reading! |
23:24:51 | Araq | CodeVance: my zen of Nim is "simple core plus macros" |
23:25:00 | Araq | and eventually it will be true. |
23:25:29 | * | yglukhov quit (Ping timeout: 260 seconds) |
23:25:44 | Araq | the guiding principle of the future developments. |
23:25:59 | CodeVance | you will reach the state of nim |
23:26:36 | * | ieatnerds quit (Quit: Leaving) |
23:28:08 | Araq | fortunately what 'simple' means is not static. Even Go is a pretty big language by the standards of the 70ies. |
23:31:49 | * | CodeVantage joined #nim |
23:31:55 | CodeVantage | nim is simple but expressive |
23:33:21 | * | CodeVance quit (Ping timeout: 255 seconds) |
23:34:03 | CodeVantage | how do I get the nimble package path? |
23:34:08 | FromGitter | <mratsim> @Araq, yeah we use it to produce our research :D |
23:38:46 | Araq | why the sudden interest in IUP? it's dead |
23:38:54 | Araq | no OSX support. |
23:41:00 | CodeVantage | tcl wrapper? |
23:41:01 | CodeVantage | XO |
23:41:13 | FromGitter | <data-man> @Araq: Dead? Last commit at r4819 | scuri | 2018-04-24 22:11:32 +0300 :) |
23:41:49 | Araq | they promised OSX support for as long as I promised v1 |
23:42:56 | * | vivus joined #nim |
23:44:03 | FromGitter | <data-man> But development is more active than libui. |
23:45:49 | FromGitter | <data-man> And libui isn't pure C lib. |
23:46:53 | Araq | that never bothered me. |
23:47:05 | dom96 | shashlick: nsis is so archaic it barely supports unicode |
23:47:07 | Araq | targetting osx with pure C is kinda masochistic |
23:48:08 | dom96 | Araq: I was just looking for an excuse to mention Nim again on Reddit, your reply doesn't really give that |
23:48:47 | FromGitter | <data-man> What then? Using opengl for all platforms? |
23:49:13 | Araq | we need to release an article for reddit/HN, not hijack other threads |
23:51:03 | dom96 | Now that I've got a keyboard I can share my idea for an installer library for Windows: take any CLI app and convert it into a wizard. |
23:51:15 | dom96 | This should in theory allow me to take choosenim and turn it into a wizard automagically. |
23:51:41 | dom96 | Each stdin question would be converted to a GUI question in the wizard |
23:51:42 | CodeVantage | I think GNU already did something similar with man |
23:52:08 | dom96 | Who knows how well that would work in practice, but it's a worthy project to pursue |
23:52:32 | CodeVantage | most CLI is simple enough |
23:52:45 | CodeVantage | bool range string enum |
23:52:47 | CodeVantage | done |
23:52:49 | dom96 | Araq: yes, write some more articles, your last one did very well on HN (not sure if you're aware) |
23:53:22 | dom96 | but maybe focus on things Nim already has, instead of what this mythical version which we do not speak of will bring |
23:54:08 | dom96 | CodeVantage: yep, the library could scan the CLI apps `--help` and generate a nice checkbox filled screen automatically too |
23:54:38 | FromGitter | <data-man> @dom96: automagically? Every day I learn many new words. It's cool! :) |
23:54:54 | dom96 | It should give a convincing GUI installer 80% of the time :) |
23:55:03 | dom96 | data-man: hehe, you probably won't find that in a dictionary |
23:55:25 | CodeVantage | why even bother with reddit, why not ycombinator? |
23:56:40 | Araq | I think I should do it Trump style. win the election with bullshit twitter messages. |
23:57:21 | CodeVantage | nim needs to go viral |
23:57:29 | CodeVantage | but we need a cute animal for that |
23:57:30 | Araq | "Hey, Nim what's up, just replaced 10 stdlib iterators with a single for-loop macro" |
23:57:35 | dom96 | You should get Twitter |
23:57:52 | Araq | bah |
23:57:59 | dom96 | You can CC random Rust/Swift/D devs and tell them they're wrong :P |
23:58:15 | CodeVantage | this for nim https://xkcd.com/353 |
23:58:31 | Araq | hmm I am unable to use twitter language |
23:58:53 | CodeVantage | Just put # before every keyword] |
23:59:00 | CodeVantage | you'll be fine |
23:59:16 | dom96 | Araq: If Trump can do it... :P |
23:59:30 | CodeVantage | trump is a genius |
23:59:56 | FromGitter | <data-man> @dom96: Yeah, "Nimwarts School of Witchcraft and Wizardry" (already was) :D |