00:00:00 | Araq | and then a book shall follow |
00:00:08 | Araq | to answer your question |
00:00:15 | stefanos82 | The Nim Programming Language I presume? |
00:00:26 | Araq | I don't think DAT is any particular format |
00:00:36 | * | krux02 quit (Remote host closed the connection) |
00:02:43 | stefanos82 | yeah, that's why I said "as your tiny case study" |
00:02:52 | stefanos82 | to validate your hypothesis |
00:03:02 | CodeVance | the golden dragon book |
00:03:31 | * | donlzx joined #nim |
00:04:24 | stefanos82 | you have to read it countless times to extract a generic idea what you should really do |
00:05:43 | Araq | get "Modern compiler implementation in ML" or whatever it's called |
00:06:18 | stefanos82 | the book that helped me get rid of my fear about even attempting to write an interpreter, let alone a compiler was "Writing an Interpreter in Go" by Thorsten Ball |
00:06:44 | stefanos82 | and now he is about to release "Writing a Compiler in Go" |
00:09:35 | stefanos82 | btw dom96, why the forum auto-refreshes every now and then? |
00:10:17 | stefanos82 | I have a tab opened with it and auto-refreshes which I presume is to check whether a new comment was added so it can make it visible |
00:15:07 | stefanos82 | Araq: based on your own experience so far, how heavy macros are they for the translation procedure? I'm talking about AST of course. |
00:19:19 | * | fjvallarino joined #nim |
00:35:18 | * | thomasross quit (Remote host closed the connection) |
00:35:44 | * | thomasross joined #nim |
00:39:14 | * | dddddd quit (Remote host closed the connection) |
00:56:17 | * | stefanos82 quit (Quit: Quitting for now...) |
01:54:22 | * | voiceftp joined #nim |
01:58:48 | * | SenasOzys joined #nim |
01:59:17 | * | SenasOzys quit (Remote host closed the connection) |
01:59:44 | * | SenasOzys joined #nim |
02:01:34 | * | dorelix joined #nim |
02:02:06 | CodeVance | Can someone help me build nanovg |
02:02:16 | CodeVance | and get nanovg.nim working |
02:03:33 | FromGitter | <kayabaNerve> ?CodeVance Are you getting errors or don't know where to start |
02:04:00 | CodeVance | I can't manage to compile nanovg from source. |
02:04:20 | CodeVance | It tells me it needs glew/glfw |
02:04:33 | CodeVance | -lglfw not included and such |
02:05:31 | FromGitter | <kayabaNerve> You might want to print the exact error. |
02:05:39 | FromGitter | <kayabaNerve> Compiler, linker, runtime... |
02:06:23 | FromGitter | <kayabaNerve> Sounds linker, just checking. |
02:06:32 | CodeVance | okay from nanovg source I call premake |
02:06:35 | CodeVance | I go into build dir |
02:06:52 | CodeVance | call mingw64-make |
02:07:27 | CodeVance | example_gl2.make:175: recipe for target 'example_gl2.exe' failed |
02:07:28 | CodeVance | process_begin: CreateProcess(NULL, cc -o ./example_gl2.exe obj/Debug/example_gl2/example_gl2.o obj/Debug/example_gl2/demo.o obj/Debug/example_gl2/perf.o -L. -lnanovg -lglfw3 -lgdi32 -lwinmm -luser32 -lGLEW -lglu32 -lopengl32 -lkernel32, ...) failed. |
02:09:09 | zacharycarter | erm there's an example floating out there on github somewhere of building nanvog with Nim |
02:10:49 | CodeVance | lol |
02:10:50 | CodeVance | zachary carter: what you doing lately? |
02:11:13 | zacharycarter | nursing my bruised / cracked ribs I got over the weekend :P |
02:11:29 | CodeVance | Nice Must have been fun on that thing |
02:11:45 | zacharycarter | hahaha it's certainly been fun, only one trip to the emergency room so far hahaha |
02:12:09 | CodeVance | serious |
02:12:09 | zacharycarter | working on the front end of the playground now |
02:12:10 | CodeVance | ? |
02:12:17 | CodeVance | Did you hear of the karax vuln? |
02:12:23 | zacharycarter | yeah - I had to go get meds for the ribs I could barely breathe / couldn't get out of bed they hurt so bad |
02:12:31 | zacharycarter | no - what's the vuln with karax? |
02:13:12 | CodeVance | `/../file_outside_static` |
02:13:17 | * | SenasOzys__ joined #nim |
02:13:20 | * | voice_ftp joined #nim |
02:13:32 | CodeVance | just update the karax. |
02:13:33 | zacharycarter | hrm? |
02:13:39 | zacharycarter | what do you mean? |
02:14:11 | CodeVance | nvm |
02:14:16 | CodeVance | karax/jester |
02:14:17 | CodeVance | lol |
02:14:30 | zacharycarter | oh haha |
02:14:30 | CodeVance | https://forum.nim-lang.org/t/4028 |
02:14:36 | CodeVance | Is what I was talking about |
02:14:42 | * | craigger_ joined #nim |
02:14:52 | * | surma_ joined #nim |
02:16:09 | * | brainpro1 joined #nim |
02:16:22 | * | riidom joined #nim |
02:17:12 | * | literal_ joined #nim |
02:17:17 | zacharycarter | hrm - I don't use jester to serve up static files anyway |
02:17:22 | * | ehmry_ joined #nim |
02:17:33 | zacharycarter | so I'm not sure if it applies - but either way I'm using the latest verison of jester with the new playground |
02:18:07 | CodeVance | How's your nim html development environment |
02:18:07 | zacharycarter | I just let nginx handle static asset requests |
02:18:56 | zacharycarter | https://github.com/zacharycarter/nim-playground |
02:19:02 | * | tersec_ joined #nim |
02:19:06 | zacharycarter | that's what my project looks like |
02:19:22 | * | brainproxy quit (Ping timeout: 240 seconds) |
02:19:22 | * | arecaceae quit (Ping timeout: 240 seconds) |
02:19:23 | * | jxy quit (Ping timeout: 240 seconds) |
02:19:23 | * | copygirl quit (Ping timeout: 240 seconds) |
02:19:23 | * | tersec quit (Ping timeout: 240 seconds) |
02:19:23 | * | voiceftp quit (Ping timeout: 240 seconds) |
02:19:23 | * | craigger quit (Ping timeout: 240 seconds) |
02:19:23 | * | Guest9022 quit (Ping timeout: 240 seconds) |
02:19:23 | * | ehmry quit (Ping timeout: 240 seconds) |
02:19:24 | * | riidom_ quit (Ping timeout: 240 seconds) |
02:19:24 | * | zama quit (Ping timeout: 260 seconds) |
02:19:24 | * | surma quit (Ping timeout: 260 seconds) |
02:19:24 | * | EastByte quit (Ping timeout: 260 seconds) |
02:19:25 | * | so quit (Ping timeout: 260 seconds) |
02:19:25 | * | literal quit (Ping timeout: 260 seconds) |
02:19:25 | * | def- quit (Ping timeout: 260 seconds) |
02:19:25 | * | SenasOzys quit (Ping timeout: 260 seconds) |
02:19:25 | * | edcragg quit (Ping timeout: 260 seconds) |
02:19:25 | * | regtools quit (Ping timeout: 260 seconds) |
02:19:25 | * | surma_ quit (Changing host) |
02:19:25 | * | surma_ joined #nim |
02:19:26 | * | surma_ is now known as surma |
02:19:33 | * | edcragg joined #nim |
02:19:44 | * | EastByte joined #nim |
02:19:57 | * | copygirl joined #nim |
02:20:04 | zacharycarter | I just use VSCode / Browsersync with hot reload and Parcel for bundling (since loading monaco editor with a cdn / without a bundler is a PITA) |
02:20:39 | * | def- joined #nim |
02:20:44 | zacharycarter | the readme is a bit outdated |
02:23:01 | * | zama joined #nim |
02:23:33 | * | regtools joined #nim |
02:23:39 | CodeVance | Did you go to work like that (with bruised/cracked ribs) |
02:25:02 | * | zama quit (Changing host) |
02:25:02 | * | zama joined #nim |
02:27:09 | CodeVance | nvm get better soon |
02:29:16 | * | so joined #nim |
02:30:53 | zacharycarter | I did |
02:30:55 | zacharycarter | thanks! |
02:31:32 | * | Vindaar joined #nim |
02:31:57 | * | Vindaar is now known as Guest79477 |
02:32:05 | * | jxy joined #nim |
02:39:26 | * | arecacea1 joined #nim |
02:40:03 | shashlick | CodeVance: are you using https://github.com/fowlmouth/nanovg.nim |
02:40:51 | CodeVance | I'm using that and I'm trying to use nanovg |
02:40:51 | CodeVance | the source |
02:43:54 | shashlick | ok you are having issues building nanovg itself? |
02:44:17 | CodeVance | yes |
02:44:34 | CodeVance | Or its supposed to work in some way but I don't know how |
02:44:50 | shashlick | seems like a good candidate for nimgen |
02:44:58 | shashlick | anyway, a wrapper already exists so |
02:45:18 | * | fjvallarino quit (Remote host closed the connection) |
02:45:44 | * | fjvallarino joined #nim |
02:46:25 | CodeVance | It only counts if you can get it to work |
02:47:21 | * | literal_ is now known as literal |
02:49:57 | * | fjvallarino quit (Ping timeout: 240 seconds) |
02:50:03 | zacharycarter | well that wrapper is super old |
02:50:13 | zacharycarter | but I've gotten nanvog to work before - just takes some fiddling with |
02:50:50 | zacharycarter | also - may want to check out bgfx |
02:50:56 | zacharycarter | since opengl is going through what it's going through |
02:51:15 | zacharycarter | up to you though |
02:51:27 | zacharycarter | obviously :D |
02:51:33 | CodeVance | I'd like to use bgfx but my pc only has opengl2 |
02:51:42 | CodeVance | intel graphics are bad |
02:51:53 | zacharycarter | ah |
02:52:11 | CodeVance | I was interested in nanovg for the svg/gui |
02:52:23 | zacharycarter | NOT 2.1? |
02:52:27 | zacharycarter | sorry |
02:52:33 | CodeVance | bgfx has gl2 support But I'm not experienced enough with it |
02:52:42 | CodeVance | to know how to set it up |
02:52:54 | zacharycarter | gotta start learning somewhere :) |
02:52:55 | zacharycarter | there's lots of examples |
02:52:55 | zacharycarter | I've used it quite a bit |
02:53:06 | zacharycarter | and there are a lot of rendering engines already built with it that are open source |
02:53:22 | zacharycarter | I plan on using it in my next game project, which I'm going to start soon |
02:53:33 | CodeVance | its not an old laptop but intel's opengl drivers are out of date |
02:53:45 | zacharycarter | is it windows? |
02:53:54 | CodeVance | win7 |
02:53:57 | zacharycarter | gotcha |
02:54:09 | CodeVance | I know I need vcc but its so massive |
02:54:12 | CodeVance | to download |
02:54:37 | zacharycarter | vcc? |
02:55:08 | CodeVance | visual studion c compiler I think |
02:55:41 | zacharycarter | to do what? |
02:56:07 | CodeVance | To compile directx I think |
02:56:15 | CodeVance | or other windows things |
02:56:15 | zacharycarter | oh |
02:56:19 | zacharycarter | yeah probably |
02:56:21 | CodeVance | For things to compile |
02:56:36 | CodeVance | zachary carter: why not continue with frag |
02:56:51 | CodeVance | Mind doing an ad-hoc postmortum? |
02:59:01 | zacharycarter | I don't like frag's code structure |
02:59:18 | zacharycarter | when I started frag - this other dude wanted to help |
02:59:29 | zacharycarter | he ended up helping not very much |
02:59:46 | zacharycarter | I wrote a lot of code very fast, and was also learning Nim at the same time |
02:59:58 | zacharycarter | if you look at the code in frag vs zengine - you'll see what I mean |
03:00:42 | zacharycarter | zengine's code isn't anything great either - but besides all the conditionals regarding wasm, it's not terrible |
03:00:50 | zacharycarter | and all that was added at the very end |
03:01:09 | zacharycarter | I want to write a parallelized async tasking subsystem to be at the core of the next engine I work on, so getting that solid will be my first priority |
03:01:16 | zacharycarter | as well as a virtual file system and async resource loading |
03:01:29 | zacharycarter | and a propper rendering engine with PBR, GI, etc |
03:02:00 | CodeVance | lol |
03:02:04 | CodeVance | I'm trying to do a semi-rendering engine |
03:02:09 | zacharycarter | I'vew done this a few times now - built small engines - so I know how to slap together something fairly quickly |
03:02:25 | zacharycarter | but each time I get to spend more time on the subsystems themselves |
03:02:38 | zacharycarter | since I know how I want things designed / structured overall and what I want to focus on each iteration |
03:02:42 | zacharycarter | and every time I write one I learn quite a bit |
03:02:58 | zacharycarter | so I don't mind throwing them away at the end of the day if I'm going to improve the next time around |
03:03:47 | CodeVance | Okay. |
03:05:05 | CodeVance | So the mainloop is easy. Then you want all the subsystems to run asynchronisaly ? |
03:05:13 | CodeVance | As much as possible |
03:06:24 | zacharycarter | no |
03:06:49 | zacharycarter | well kind of |
03:06:57 | zacharycarter | I want to be able to toss tasks to a subsystem |
03:06:58 | zacharycarter | and have them run in parallel |
03:08:46 | CodeVance | Would that be easy enough with nim? I still haven't gotten the hang of async and coroutines. I don't even know the difference. (when to use which) |
03:09:42 | zacharycarter | well it can get tricky with the gc and stuff |
03:09:55 | zacharycarter | but mamy pointed me to some resources a while back |
03:10:06 | zacharycarter | let me try to find the irc logs |
03:13:12 | zacharycarter | ugh I wish I could search nim irc logs |
03:13:13 | zacharycarter | I know there's a way I just can't remember how |
03:14:38 | CodeVance | Aren't you on matrix? |
03:15:05 | shashlick | zacharycarter: just use google |
03:15:22 | shashlick | site:http://irclogs.nim-lang.org search terms |
03:15:24 | CodeVance | google `site:irc-logs.nim-lang.org bla |
03:15:40 | * | vivus quit (Quit: Leaving) |
03:15:41 | CodeVance | shashlick: it doesn't work with http |
03:18:18 | * | endragor joined #nim |
03:18:38 | * | fjvallarino joined #nim |
03:18:59 | shashlick | what are you looking for? works for me every time |
03:30:47 | * | skrylar joined #nim |
03:31:14 | FromGitter | <Varriount> Oh hey, it's zacharycarter. :D |
03:32:25 | skrylar | thats not how you spell skrylar :^) |
03:34:59 | FromGitter | <Varriount> Oh no, it's skrylar. :P |
03:35:27 | * | skrylar is forcibly dragging us in to the gtk3 era |
03:36:30 | skrylar | kinda curious if anyone ever used nfltk for anything, although since it doesn't appear to be in nimble i'm not sure many people know that its been a thing for almost a year now |
03:39:04 | zacharycarter | :p |
03:39:20 | zacharycarter | I'll wait till mratsim is around and bug him for those gists again |
03:39:27 | zacharycarter | hi Varriount and skrylar |
03:39:36 | skrylar | hi zacharycarter |
03:43:43 | FromGitter | <Varriount> Hrm, as much as I like this PR, the DSL doesn't seem to give enough information to write a simple parser. https://github.com/nim-lang/Nim/pull/8075/files |
03:53:04 | skrylar | the pegs module didn't look super useful when i looked in to it |
03:53:29 | skrylar | i was hoping more rebol parse or petitparser and less janky regex api |
03:54:04 | skrylar | petitparser looks fairly straightforward to implement.. although optimizing it, hrm. |
03:55:47 | skrylar | I have come to appreciate the elegant simplicity of wildcard operator definitions (ex. operator = sigil+) although i think nim is close to that? or is it just a set of overloadables |
03:56:38 | * | dorelix quit (Quit: Leaving) |
03:58:41 | * | rockcavera quit (Read error: Connection reset by peer) |
03:59:05 | * | rockcavera joined #nim |
04:00:59 | shashlick | I've liked pegs as a lighter weight regex |
04:04:35 | FromGitter | <Varriount> skrylar: To me, the biggest limitation is that it can only capture a limited number of times. |
04:05:12 | FromGitter | <kayabaNerve> I love Nim |
04:05:14 | FromGitter | <kayabaNerve> Just saying it |
04:05:23 | FromGitter | <kayabaNerve> Evening @Varriount . You doing well? :D |
04:05:48 | FromGitter | <Varriount> Yep. I think I finally got output redirection sorted for my command shell. |
04:06:08 | FromGitter | <Varriount> The code isn't as nice as I would like it, but it works the same way bash does, more or less. |
04:07:06 | FromGitter | <kayabaNerve> Nice! GitHub? |
04:07:47 | FromGitter | <Varriount> Here, let me make it public. |
04:08:26 | shashlick | Varriount: finally got appveyor setup for nimgen |
04:08:26 | FromGitter | <kayabaNerve> I got a project open sourced today. #CommunityService |
04:08:58 | shashlick | Fun times, get to learn something every day |
04:09:46 | FromGitter | <Varriount> Tada! https://github.com/Varriount/commandant |
04:10:36 | FromGitter | <kayabaNerve> Nice name |
04:11:16 | FromGitter | <kayabaNerve> Are you Clay? |
04:14:02 | FromGitter | <Varriount> Yes, that's my name. |
04:14:10 | FromGitter | <kayabaNerve> Cool |
04:14:27 | FromGitter | <kayabaNerve> Checking because you have 2 commits at the very start and then it's just Clay |
04:17:28 | FromGitter | <kaushalmodi> @Varriount Looks like you committed using your work email |
04:17:37 | FromGitter | <Varriount> Woops. |
04:17:59 | shashlick | any built-in help? |
04:18:53 | FromGitter | <kaushalmodi> https://stackoverflow.com/questions/2919878/git-rewrite-previous-commit-usernames-and-emails |
04:18:53 | CodeVance | bye all |
04:20:03 | FromGitter | <kayabaNerve> Bye |
04:20:23 | FromGitter | <kayabaNerve> @Varriount So if I want to mail you a package, is just your name fine or do I need a cubicle number... ? |
04:21:21 | shashlick | did he get doxxed or something? |
04:22:00 | FromGitter | <kayabaNerve> Nah. His work email leaked. I'm just messing with him |
04:22:35 | skrylar | he failed his vigilance DC check |
04:22:40 | skrylar | it happens to us all in the end |
04:22:43 | FromGitter | <kayabaNerve> It's not that big of a deal IMO but I will stop messing with him |
04:22:51 | FromGitter | <kayabaNerve> skrylar: My Git commits just use my email |
04:22:57 | skrylar | just be glad its not a fossil repo |
04:23:15 | FromGitter | <kayabaNerve> Well. Actually. I use GitHub desktop. It probably uses the GitHub mask... |
04:23:40 | skrylar | i use my email in github. i don't get a lot of mail from humans /shrug |
04:24:06 | FromGitter | <kayabaNerve> Nope. It uses the email of my bankrupt business |
04:26:14 | FromGitter | <Varriount> Ok, fixed. |
04:26:31 | FromGitter | <Varriount> For anyone who encounters the same situation: https://help.github.com/articles/changing-author-info/ |
04:27:04 | FromGitter | <kayabaNerve> @Varriount I won't tell anyone it was [email protected] |
04:27:18 | FromGitter | <kaushalmodi> I use conditional profiles: https://stackoverflow.com/a/43884702/1219634 |
04:27:45 | FromGitter | <Varriount> @kaushalmodi Oh nice, that's handy |
04:27:46 | FromGitter | <kaushalmodi> That way I can have clean distinction between work and fun repos. |
04:29:32 | skrylar | something something avoid bankruptcy :f |
04:31:08 | FromGitter | <kayabaNerve> :/ |
04:31:50 | FromGitter | <kayabaNerve> I'm doing that. It sucks. I get paid 1/6th of my market value. |
04:32:23 | FromGitter | <Varriount> @kayabaNerve Anything else you've noticed? |
04:32:28 | * | lompik joined #nim |
04:32:57 | FromGitter | <kayabaNerve> About avoiding bankruptcy, your personal info, or the repo? |
04:34:36 | FromGitter | <kaushalmodi> Question about enum and holes: https://nim-lang.org/docs/manual.html#types-enumeration-types |
04:34:39 | FromGitter | <Varriount> Mainly the repo. |
04:35:09 | FromGitter | <kaushalmodi> That section says that inc/dec/etc are not available for enums with holes.. |
04:35:16 | FromGitter | <kaushalmodi> But they actually work |
04:35:39 | FromGitter | <kayabaNerve> @Varriount There's a ton of commented stuff and I may steal your lexer someday. |
04:35:59 | FromGitter | <Varriount> My lexer is really simple. |
04:36:20 | FromGitter | <kaushalmodi> The compiler doesn't throw error but trying to echo an enum after it's inc'd value ends up on a "hole" value prints just the int with "invalid data" text.. no errors |
04:36:24 | FromGitter | <kayabaNerve> Mhm |
04:37:09 | skrylar | enums and sets have presented some silliness in my attempts to get the gnome stack working |
04:37:16 | FromGitter | <kayabaNerve> It makes me feel better to be able to use someone else's work to test my new work as a part before I finish it as a whole. |
04:37:19 | skrylar | namely that they use a lot of "enums" that are bit flags |
04:37:49 | FromGitter | <Varriount> skrylar: Isn't that what Nim's enums are? |
04:37:52 | FromGitter | <kayabaNerve> TBH I only like one flag |
04:38:04 | FromGitter | <kayabaNerve> Who wants to seize the means of productions, comrades? |
04:38:34 | skrylar | @varriount: nim has sets, which are basically the ole pascal enum+set-of-enum trick which is quite nice but i don't believe we have guarantees on type size |
04:38:59 | skrylar | when interacting with C code one needs guarantees on type size, or else we're in shady "i have to run a jenkins crossbar test to make sure this never breaks" |
04:39:31 | FromGitter | <Varriount> skrylar: There's a sizeof pragma for enums |
04:39:44 | skrylar | sets are separate types tho? |
04:40:02 | FromGitter | <Varriount> Oh, I was talking just about enums |
04:40:26 | skrylar | the pascal convention doesn't really guarantee WHICH bit you get either, though usually its just done in order |
04:40:36 | FromGitter | <kaushalmodi> Hmm, did my question mix up with an ongoing enum discussion? |
04:40:51 | skrylar | you mentioned holes in enums |
04:40:57 | FromGitter | <kaushalmodi> Yes |
04:41:00 | skrylar | enums are persnickety. |
04:41:48 | FromGitter | <kaushalmodi> So the compiler is not erroring out when I use inc/dec with holey enums.. bug? |
04:42:22 | skrylar | i'm not sure what araqs current impression is on those right now |
04:42:45 | skrylar | one would suggest that pred/succ should just step over the holes but that might have subtle performance implications |
04:44:20 | skrylar | what probably *should* happen is that it does step over holes (possibly using switch statements internally?) but emit a HintYourEnumIsSilly warning |
04:44:25 | FromGitter | <kaushalmodi> The manual says that those methods are not available for non-ordinals like "holey enums" (should make that an official term :)), but they do work.. albeit with surprising output |
04:44:42 | FromGitter | <kaushalmodi> skrylar: yeah |
04:45:41 | skrylar | i am usually for trying to do what the user said but then also the lisp thing of warning the user when they are asking for things dumbly and making the compiler emit janky slow code |
04:50:03 | FromGitter | <Varriount> Yay, my code no longer leaks file decsriptors |
04:50:07 | FromGitter | <Varriount> *descriptors |
04:52:03 | skrylar | woo |
04:57:36 | skrylar | hmm. are our term rewriting macros powerful enough to say, replace "foo(bar) or foo(baz) or foo(wizards)" with "foo([bar, baz, wizards])" |
04:59:10 | skrylar | sidebar: wekan is peeving me off. yes its pretty, but it seems to be buggy and i can't do simple things like move cards to another board :-| |
04:59:38 | skrylar | end of the month should probably migrate back to kanboard (where one can not only move cards between boards, but do so *automatically*) |
05:22:37 | * | nsf joined #nim |
05:25:18 | shashlick | any clue why my process input stream writeLine hangs even though the process has quit? |
05:30:10 | * | miran_ joined #nim |
05:32:58 | FromGitter | <Varriount> shashlick: What OS are you running on? And can you post the code? |
05:47:00 | shashlick | Windows - let me post a gist |
05:47:13 | shashlick | it's not hanging anymore but will keep an eye out |
05:47:21 | shashlick | will share if i run into this again |
06:20:36 | * | miran_ quit (Ping timeout: 256 seconds) |
06:21:08 | * | shashlick quit (Remote host closed the connection) |
06:25:26 | * | tzekid joined #nim |
06:29:17 | * | shashlick joined #nim |
06:30:19 | * | yglukhov[i] joined #nim |
06:30:20 | * | yglukhov_ quit (Read error: Connection reset by peer) |
06:33:41 | * | Vladar joined #nim |
06:35:00 | * | subsetpark quit (Quit: --) |
06:42:02 | Araq | skrylar: "enums with holes" are a bad feature |
06:42:19 | Araq | and so neither succ/pred nor inc/dec should work with them |
06:42:22 | FromGitter | <tim-st> is there a pragma I can use to mark my proc/iterator for debug only? |
06:43:48 | skrylar | when defined(debug)? |
06:43:53 | FromGitter | <mratsim> when debug: ⏎ useiterator() |
06:43:58 | FromGitter | <mratsim> when defined* |
06:44:10 | FromGitter | <mratsim> skrylar was faster |
06:44:12 | FromGitter | <tim-st> hm, but it should be available in release mode too |
06:44:35 | FromGitter | <tim-st> something like deprecated but without deprecating it |
06:44:49 | skrylar | in that case emit a warning |
06:44:50 | FromGitter | <mratsim> in the iterator, put when defined(debug): {.error: “only use in debug mode”.} |
06:45:10 | FromGitter | <tim-st> ok, thank you both :) |
06:45:23 | FromGitter | <mratsim> check how modules in threadpool or in httpclient forces you to compile with threads:on or ssl |
06:45:34 | FromGitter | <tim-st> ok, thanks |
06:47:17 | FromGitter | <tim-st> I think marking it deprecated is easiest |
06:48:53 | FromGitter | <mratsim> or when not defined(debug): {. hint: “Note - this proc should only be used in debug mode.} |
06:49:30 | FromGitter | <tim-st> perfect, hint is exactly what I need, in both debug and release mode |
06:49:43 | FromGitter | <tim-st> btw is there a list of all pragmas? |
06:49:58 | FromGitter | <tim-st> ah here: https://nim-lang.org/docs/manual.html#pragmas |
06:50:34 | skrylar | you can also use your own defines for separate debug toggles; some libs i used to poke with did that for ndebug builds |
06:51:54 | FromGitter | <tim-st> there is also `warning` this could be fitting too |
06:53:30 | FromGitter | <Varriount> Behold, my abomination for tonight! https://gist.github.com/Varriount/928c397492fa0ee426590d59c453d818 |
06:53:37 | FromGitter | <Varriount> (Line 24) |
06:54:47 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
06:59:01 | * | tersec_ quit (Ping timeout: 244 seconds) |
07:00:29 | * | tersec_ joined #nim |
07:09:28 | FromGitter | <alehander42> @Varriount I saw you writing about parser dsl-s, what do you think about this one https://github.com/alehander42/area42/blob/master/lispy.grammar (very raw, but my idea was to have something like bnf with annotations for fields and a few builtin "functions" like join, and make it able to generate parsers in various languages based on it) |
07:09:57 | FromGitter | <alehander42> maybe making it a purely nim-syntax macro dsl would be better |
07:10:46 | FromGitter | <Varriount> @alehander42 The problem is that in most parsers, there's two phases: tokenization, and tree construction. |
07:11:20 | FromGitter | <Varriount> Most DSLs I've seen for Nim try to treat these phases as the same thing. |
07:12:03 | FromGitter | <Varriount> The proposed DSL for pegs.nim comes close - it leaves tree construction to the implementor. |
07:12:13 | FromGitter | <Varriount> It merely emits events to be consumed. |
07:12:39 | FromGitter | <Varriount> Ideally, it would parse the DSL at compile-time and emit static code, but that's a long way off. |
07:12:54 | FromGitter | <alehander42> yeah, my idea was to generate directly AST trees, that's why I want to annotate how I want the tree to look |
07:13:16 | FromGitter | <Varriount> @alehander42 By the way, the most "fun" parser generator I've ever used was a python library called codetalker. |
07:13:54 | FromGitter | <Varriount> https://pypi.org/project/CodeTalker/ |
07:14:01 | FromGitter | <Varriount> https://github.com/jaredly/codetalker |
07:15:01 | FromGitter | <alehander42> hm, it looks nice, still kinda code-based |
07:15:22 | FromGitter | <alehander42> I really dig a purely declarative approach, exactly because it's easier to make multiple parser "backends" for it |
07:15:38 | FromGitter | <Varriount> Here's the pegs.nim proposed DSL: https://github.com/nim-lang/Nim/pull/8075 |
07:15:51 | FromGitter | <alehander42> also my dream was to apply a similar dsl to other aspects of compiler writing, as simple type systems and generators |
07:20:01 | FromGitter | <alehander42> I think those guys https://fosdem.org/2018/schedule/event/code_reviving_the_meta_compiler_dream/ had a similar idea, but without the assist for compiler backend thing |
07:22:54 | FromGitter | <alehander42> the PR looks cool indeed, the enter/leave idea is cool |
07:22:56 | FromGitter | <alehander42> ! |
07:28:03 | FromGitter | <Varriount> @alehander42 I'm determined to really evaluate the concept though for holes. |
07:28:18 | FromGitter | <Varriount> The last thing we need is another fatally-flawed feature. |
07:28:41 | FromGitter | <kayabaNerve> @Varriount I would like to add an RFC to Nim |
07:28:47 | FromGitter | <kayabaNerve> We have eInt and oInt |
07:28:58 | FromGitter | <kayabaNerve> Only even values can be assigned to eInt and vice versa |
07:29:10 | FromGitter | <kayabaNerve> We delete int for these new types for ultimate clarity and precision |
07:29:35 | FromGitter | <kayabaNerve> If you do manage to assign an even value to eInt, it seg faults. |
07:31:40 | FromGitter | <Varriount> @kayabaNerve Only if I get to add an vInt type. |
07:34:37 | FromGitter | <alehander42> @kayabaNerve that sounds very very specific |
07:35:29 | FromGitter | <alehander42> but can't you somehow do it today? you make them distinct, and you overload the common math ops for them |
07:35:41 | * | Lord_Nightmare joined #nim |
07:36:26 | FromGitter | <alehander42> the problem is, that wouldn't work even for `div` |
07:36:51 | FromGitter | <tim-st> When I need a number to be "a multiple of the os page size" is it enough to do `assert size mod 4096 == 0`? |
07:38:02 | FromGitter | <alehander42> @kayabaNerve still, it's funny you can generalize that idea |
07:38:36 | FromGitter | <alehander42> you can have something like Modulo[N] and Modulo[N][M] is a number which has M mod N |
07:39:50 | FromGitter | <alehander42> and for constants, nim could autogenerate the needed `+`, `*` and `-` and typecheck e.g. ⏎ ⏎ ```proc a*(b: Modulo[5][3], c: Modulo[5][4]): Modulo[5][0] = ⏎ b + c + 4``` [https://gitter.im/nim-lang/Nim?at=5b4462c533b0282df40ecc09] |
07:40:19 | FromGitter | <alehander42> oh b + c + 3 |
07:40:24 | FromGitter | <alehander42> see, nim would've told me ! |
07:41:16 | FromGitter | <alehander42> and even would be `Modulo[2][0]` etc |
07:41:19 | FromGitter | <Varriount> @tim-st Not really. Page size is dependant upon OS configuration and architecture. |
07:43:24 | FromGitter | <Varriount> @tim-st http://man7.org/linux/man-pages/man2/getpagesize.2.html |
07:45:00 | skrylar | hrm. restya board looks neat |
07:45:13 | FromGitter | <Varriount> @tim-st For Windows: https://msdn.microsoft.com/en-us/library/ms724381(v=vs.85).aspx and https://msdn.microsoft.com/en-us/library/ms724958(v=vs.85).aspx |
07:46:08 | FromGitter | <tim-st> @Varriount thanks, so if I know the default leastCommonMultiple(unix, windows, otherCommonOs) I can calculate the number correctly under the assumption it wasnt changed? |
07:46:12 | FromGitter | <Varriount> Oh, and don't forget https://msdn.microsoft.com/en-us/library/ms724340(v=vs.85).aspx |
07:46:33 | FromGitter | <tim-st> *leastCommonMultipleOfPagesizes |
07:46:47 | FromGitter | <Varriount> Theoretically. |
07:46:53 | FromGitter | <tim-st> Thanks! |
07:47:04 | FromGitter | <Varriount> However it's probably better just to use those functions. |
07:47:54 | FromGitter | <Varriount> @tim-st Whatever assumption you make about the current page size may not hold up to future architectures. |
07:49:42 | FromGitter | <tim-st> that's no problem, the docs say it "should be" a multiple of the pagesize, if it's not performance could be a bit lower |
07:53:57 | * | PMunch joined #nim |
07:54:13 | Araq | "it's funny you can generalize that idea" -- everything can be generalized in programming. |
07:54:46 | Araq | and it's the curse of programming languages |
07:57:56 | FromGitter | <Varriount> @tim-st Uh, or the OS could return an error. |
07:58:11 | FromGitter | <Varriount> I believe Windows does. I don't know about Linux. |
08:08:04 | FromGitter | <mratsim> Generalization leads to architecture astronauts: https://www.joelonsoftware.com/2001/04/21/dont-let-architecture-astronauts-scare-you/ |
08:11:13 | FromGitter | <tim-st> @Varriount maybe I just make it a multiple of 4mb instead of 4kb that should be enough |
08:11:28 | FromGitter | <Varriount> @mratsim I'm guilty of that sometimes. 😔 |
08:16:32 | Araq | tim-st: page size is 4KB |
08:17:10 | Araq | Nim's allocator and GC is based on this number and it never fails. |
08:17:16 | Araq | and do you know why? |
08:17:30 | Araq | bigger page sizes are still a multiple of 4KB. |
08:17:31 | FromGitter | <tim-st> Araq: thanks, I need a proc that does nextNumberDividableBy4096(number) |
08:17:46 | FromGitter | <tim-st> Araq: yes, that was my idea, i told above |
08:18:49 | Araq | proc roundup(x, v: int): int {.inline.} = |
08:18:49 | Araq | result = (x + (v-1)) and not (v-1) |
08:18:49 | Araq | sysAssert(roundup(14, PageSize) == PageSize, "invalid PageSize") |
08:18:51 | Araq | sysAssert(roundup(15, 8) == 16, "roundup broken") |
08:18:53 | Araq | sysAssert(roundup(65, 8) == 72, "roundup broken 2") |
08:19:05 | FromGitter | <tim-st> nice, thanks :) |
08:21:03 | FromGitter | <tim-st> yes, it works |
08:22:23 | * | dddddd joined #nim |
08:28:41 | * | nc-x joined #nim |
08:29:16 | nc-x | Do i have to implement my own hashing function for `ref object of RootObj` if I want to use it in a Table? |
08:31:26 | * | nc-x quit (Client Quit) |
09:01:19 | FromGitter | <rayman22201> This is a thing I did. Thoughts? https://github.com/nim-lang/Nim/pull/8260 |
09:01:33 | * | rosshadden quit (Read error: Connection reset by peer) |
09:03:26 | FromGitter | <rayman22201> Also it's really late for me and I have to sleep now, so I'm going to have to be that awkward guy to post and leave. Be back online tomorrow! Thanks! |
09:03:47 | * | rosshadden joined #nim |
09:19:13 | * | SenasOzys__ quit (Remote host closed the connection) |
09:50:49 | * | skrylar quit (Remote host closed the connection) |
10:15:12 | * | stefanos82 joined #nim |
10:16:04 | * | krux02 joined #nim |
10:21:41 | krux02 | Araq: I have these gdb pretty printers. I would like to create a PR for Nim, but I don't know where to put them. |
10:21:55 | Araq | tools/ ? |
10:22:19 | Araq | ideally there is also a 'koch prepare_gdb' command |
10:22:52 | Araq | you will need to update these pretty printers soon though, as the new string/seq implementation is coming |
10:24:50 | * | skyfex quit (Quit: Textual IRC Client: www.textualapp.com) |
10:26:03 | krux02 | Araq: that wouldn't be too much of a problem, because the main problem was getting around how to implement them using the gdb API. The acutal work that needs to be done isn't too much. |
10:26:18 | krux02 | Araq, how does the new string memory layout look like? |
10:26:25 | krux02 | more like std::string? |
10:27:14 | Araq | plan is { len; p } where p points to { cap; pointer to allocator; charData[...] } |
10:27:47 | Araq | string literals have a nil allocator and are zero-copy |
10:28:31 | krux02 | and nil strings are a nil pointer? |
10:28:37 | krux02 | and appending to a nil string? |
10:28:43 | krux02 | what is the allocator there? |
10:28:53 | Araq | the default one |
10:29:44 | krux02 | good thing is that the length of a nil string isn't a special case of nil string anymore. |
10:30:30 | krux02 | I found out that the gdb api to write pretty printers is actually quite good. It is just poorly documented it a lot of cases. Good thing I had help in #gdb |
10:31:04 | krux02 | and because of the bad documentations the frontends also struggle to be correct |
10:32:06 | stefanos82 | Araq: wouldn't be safer if a string's default value were ""? |
10:32:31 | krux02 | stefanos82, that is the case |
10:32:59 | stefanos82 | oh "" for a string is considered nil? |
10:33:11 | krux02 | no |
10:33:32 | krux02 | a string won't be a pointer type anymore |
10:33:40 | stefanos82 | lovely! |
10:33:55 | krux02 | it is the tuple[len: int; p: pointer] |
10:34:05 | krux02 | so p will be nil on "" |
10:34:46 | krux02 | but not the string itself |
10:34:56 | stefanos82 | I see |
10:35:39 | Araq | I'm not entirely happy with this representation but it's the best I could come with :P |
10:35:58 | stefanos82 | Araq: which representation exactly? that of a string? |
10:36:12 | krux02 | the current implementation is a hash to just treat "" and nil equivalently. With a few exceptions (bugs) here and there, because they are not the same. |
10:36:19 | FromGitter | <tim-st> any way to check if a int is a valid file mode like `0o0777` ? |
10:36:52 | Araq | yes. SSO is a sweet idea but my feeling is that we gain more by making string literals zero-copy |
10:37:05 | Araq | and moves faster |
10:37:13 | krux02 | Araq: I was listening to a lot of c++ conference talks, and it seems the best string representation (for c++) would be a representation with small string optimizations. |
10:37:44 | stefanos82 | what's SSO? |
10:37:45 | krux02 | so that small strings do not have heap memory that causes expensive copies. |
10:38:22 | Araq | also code like proc replace(a, b, c: string) suffers if your strings take 3 or 4 machine words |
10:38:25 | krux02 | (I mean hack not hash) |
10:38:45 | Araq | krux02: pretty sure I watched all these talks too. |
10:39:05 | krux02 | good ;) |
10:39:44 | Araq | but Nim is not C++, in Nim you can write const data = [["a", "b", "c"], ["x", "y", "z"]] |
10:39:55 | Araq | without having to resort to C strings. |
10:40:49 | krux02 | C string literals have one nice treat though. The same liter on the same file will be collapsed to the same memory location. |
10:40:59 | krux02 | with file I mean module |
10:41:42 | * | rockcavera quit (Ping timeout: 244 seconds) |
10:42:06 | krux02 | makes the module smaller. But I don't think that it would really matter today anymore at all. |
10:42:34 | stefanos82 | Araq: without knowing much around string implementation, how does Nim handles little-endian and big-endian? |
10:42:58 | krux02 | stefanos82, there is a module where you can manually change the endianness of numbers |
10:43:10 | krux02 | but strings are not endian affected |
10:44:07 | krux02 | I think only 16 and 32 bit sized character strings are affected by endianness. |
10:44:14 | krux02 | Nim has 8 bit chars |
10:44:49 | stefanos82 | this has some good info in it around endianness https://stackoverflow.com/q/21694302 |
10:46:27 | krux02 | as I said Nim isn't affected. It doesn't store characters into pointer members. |
10:47:29 | stefanos82 | very well |
10:52:29 | stefanos82 | is there a way to get only the generated AST as my output? |
10:52:48 | * | Perkol joined #nim |
10:53:24 | krux02 | the ast is not characters it is a data structure that is used during compilation. |
10:54:13 | krux02 | but you can always print the ast of something with the help of a macro |
10:54:33 | krux02 | macro printit(arg: typed): untyped = dumpTree(arg) |
10:59:30 | Araq | krux02: Nim does the same, string literals are "pooled" or whatever you want to call it |
10:59:58 | krux02 | Araq: http://ix.io/1gHS |
11:00:45 | krux02 | oh, I din't know about the pooling. Can it be that the last time I did it, it was not yet the case? |
11:01:43 | krux02 | Araq: C++ also had some improvements over the years. Especially initialization became a lot better. |
11:03:07 | krux02 | in c++ {} can be used to initalize everything, not just arrays. |
11:03:28 | krux02 | but c++ wouldn't be c++ if it hadn't some exceptions. |
11:04:08 | krux02 | so in order to call the constructor with size and capacity of std::vector<int> you still have to use the () constructor. |
11:04:47 | * | viniarck joined #nim |
11:05:24 | * | viniarck left #nim (#nim) |
11:08:17 | Perkol | https://raw.githubusercontent.com/ultramancool/tweetnacl-usable/master/tweetnacl.c I try to use c2nim to convert it, get error tweetnacl.c(3, 8) Error: did not expect [NewLine] |
11:09:13 | Perkol | What may be the problem |
11:09:29 | FromGitter | <mratsim> strange, someone had the same newLine issue yesterday |
11:16:27 | * | skrylar joined #nim |
11:34:01 | FromGitter | <alehander42> are js string and seq starting with "" @[] now? |
11:34:26 | FromGitter | <alehander42> that would be a great anti-bug default |
11:35:31 | krux02 | alehander42: I don't know anything about the js backend. |
11:37:27 | stefanos82 | krux02: wow, what a coincidence lol! You have mentioned constructors and Jason Turner just released a new video explaining the use of in_place_t http://paste.debian.net/hidden/d7cdc3c4/ |
11:39:42 | krux02 | I don't know std::in_place_type_t, and I knind of don't want to know |
11:43:36 | stefanos82 | it's that kind of magic that does magic of doing magic on magic without an extra magic on top of magic...oh look, a squirrel! |
11:43:50 | stefanos82 | that kind of logic |
11:45:13 | krux02 | no it is yet another attempt to have an argument of "hey you can do it, see" but in fact the solution is unteachable or not practicable. |
11:46:02 | stefanos82 | true |
11:46:18 | stefanos82 | if you could only see my facial expressions when I saw the video |
11:46:46 | krux02 | it is like std::next, or std::array. |
11:48:08 | krux02 | They are great in theory, if you would use them exclusively. But the problem is the introduction didn't fix any of the existing problems nor problems of people who are just starting to learn the language. They are most an increase of complexity in the language to fix a minor disign flaw. |
11:48:28 | stefanos82 | bingo |
11:49:21 | stefanos82 | they are trying to fix the crack on the door by setting up an entire hangar that builds the whole company that constructs the tools that build brand new doors |
11:49:28 | stefanos82 | which does not make any sense to me |
11:49:47 | krux02 | no they fix the crack in the door, but building a new door that does not have the crack. |
11:50:07 | krux02 | But that doesn't fix the crack at all. |
11:51:00 | krux02 | And then they are happy, that they didn't break any code that relies on the crack in the door. |
11:52:16 | krux02 | You then just have two doors. One with a crack and one without a crack that nobody uses. |
11:52:48 | stefanos82 | yeah :/ |
11:54:45 | krux02 | well it is good if you know all the side entries without the cracks. But I still think it takes you 10 years to learn about them all. |
11:55:01 | krux02 | 10 years of writing buggy horrible software. |
11:58:09 | Perkol | https://raw.githubusercontent.com/ultramancool/tweetnacl-usable/master/tweetnacl.c what can /temp-tweetnacl.nim.c(701, 32) Error: expected ';' error mean? |
11:59:02 | Perkol | sorry gcc: warning: tweetnacl-usable: linker input file unused because linking not done |
12:02:38 | stefanos82 | krux02: imagine, I don't have a professional experience around C++, only on a personal level purely academic experience and I have seen some horrors with legacy codes. Every newer release they try to fix old issues and most of the time they introduce new headaches. |
12:03:27 | krux02 | yea unmaintainable. |
12:03:34 | stefanos82 | if C++ continues with this pace, the standard manual will become the size of "The Art Computer Programming" |
12:03:36 | krux02 | I hope Nim doesn't do the same horrors. |
12:03:37 | FromGitter | <mratsim> I don’t think the issue is with C++. Python legacy code can be ugly too. It’s focus on new features and use case without paying the technical debt. |
12:04:49 | stefanos82 | the problem with C++ is that Bjarne himself acknowledges the problem and suggests to pick the right paradigm for the right problem |
12:04:51 | krux02 | I think in dynamically typed languages it can bu much harder to pay the technical depth, because it is very weak at statically analizing the code. |
12:05:17 | stefanos82 | but C++ is not a toolkit; it's a programming language and us as human species tend to like knowing everything in great detail, especially researchers and scientists |
12:05:32 | krux02 | not just them |
12:05:41 | FromGitter | <mratsim> I would love to have users that want to know everything in details ;) |
12:06:05 | stefanos82 | mratsim: it's our fault that users got lazier and lazier |
12:06:07 | krux02 | everybody who cares about a good solution wants to know the details of what is actually happening on the machine. |
12:06:25 | stefanos82 | thanks to automation, people got used to find everything around them right next to a push button |
12:06:26 | krux02 | stefanos82, no it's not our fault. |
12:06:55 | krux02 | I don't know who is to blame. But I generally like to blame the lazy people. |
12:07:03 | FromGitter | <mratsim> I don’t think so. Lots of people just want something to just work and focus on say the footbal match and not DNS, networking, redundancy, high availablity, chaos monkeys …. |
12:07:03 | krux02 | People who don't care are not good programmers. |
12:07:06 | stefanos82 | that's us, the programmers |
12:07:59 | krux02 | people who don't care what actually happens on the machine, and don't want to know how the program gets compied are not good programmers |
12:08:12 | stefanos82 | in the past we had actual qualitative code, due to many factors. nowadays with this cloud thing, people don't care about quality; they care about quantity. |
12:08:13 | FromGitter | <mratsim> those people are the one who pay the companies, which develop the product and the devs. And you have a balance to reach for the feature people want and the technical debt and craftmanship of devs |
12:08:14 | krux02 | that also applies to javascript programmers. |
12:08:58 | krux02 | I don't want to go to far into that. |
12:09:02 | stefanos82 | companies don't let developers to build secured products. They care about delivering, that's all |
12:09:14 | stefanos82 | money money money |
12:20:30 | FromGitter | <narimiran> not everyone *wants* to be 'good programmer'. not everyone *can* be 'good programmer' |
12:21:20 | livcd | a digital plumber |
12:21:36 | * | Guest79477 quit (Quit: Leaving) |
12:21:51 | livcd | #nim-offtopic |
12:24:04 | krux02 | stefanos82, money is good. It allows to get such things as food. |
12:25:25 | krux02 | A good programming language is a language that enables novice programmers to write stable und usable software in reasonable amount of time. |
12:27:05 | krux02 | and that is what I want for Nim. Enable novice programmers to write stable und usable programs. And no nil strings is on step in that direction. |
12:33:19 | krux02 | Araq: I have a primitive test project to test the gdb printers. Where should I put that? |
12:34:32 | Araq | tests/untestable, maybe |
12:35:25 | Araq | (which should have been called 'tests/notautomatable') |
12:35:48 | krux02 | ok |
12:36:06 | krux02 | I think it is automatable, but it is so different to test that all the other automated tests |
12:52:00 | FromGitter | <kaushalmodi> A discussion going on here if Nim could allow line continuation to work with tokens at beginning of lines too (if possible): https://github.com/nim-lang/Nim/issues/8258 |
13:07:26 | Araq | given enough effort, everything is possible |
13:08:39 | Araq | but "readability" either needs to be baked up by science or paraphrased as "I like it better this way" |
13:11:52 | Araq | I fail to see the point though, don't you all want a tool (nimpretty) that settles every tiny code style question? |
13:12:12 | Araq | then why introduce new ways to write the same? |
13:12:53 | FromGitter | <mratsim> Brainfuck to rule them all |
13:13:03 | Araq | I mean, I know you don't want a "consistent" style. you want *your* style, consistently followed by everybody else. |
13:24:04 | skrylar | mratsim: s/brainfuck/rebol/ |
13:24:46 | skrylar | well.. smalltalk with integration to the parse dialect might be heavenly :ponders: |
13:26:27 | FromGitter | <kaushalmodi> Araq: I've seen that languages either allow a special line continuation token or allow the lines to flow anyhow to the next line if they require a line end char like semicolon. So the line continuation requirement of Nim came as a bit of surprise, and so I put that in my notes. Surprisingly, I saw this issue showing that someone else also found this behavior surprising. That's all. If this alternative style is not |
13:26:27 | FromGitter | ... implemented, not a big deal. But if enough users like this alternative style and gets implemented, I'll definitely be using that everywhere *consistently* :) |
13:30:42 | * | fjvallarino quit (Remote host closed the connection) |
13:30:48 | * | fjvallarino joined #nim |
13:31:02 | Araq | well ',' and ';' are natural line continuations and '+', 'and' etc follow them for consistency... |
13:31:53 | Araq | you only argue for consistency when it suits your tastes. and that's getting tiresome really quickly |
13:32:33 | Araq | and that's a non-personal 'you' here. |
13:32:43 | Araq | every programmer seems to do that. |
13:36:08 | FromGitter | <kaushalmodi> Araq: For record, I never brought this up under the consistency category. It was just surprising and was living silently in my notes. I was just pleased to see someone feel strongly about this detail to request supporting it. |
13:36:38 | FromGitter | <kaushalmodi> I don't make fix-for-consistency requests lightly. |
13:37:34 | FromGitter | <kaushalmodi> If you support this, I'll be very grateful, that's all. |
13:39:31 | Araq | now we're getting somewhere, if you just say "I like this style better, how about we support it" is a far better way than hiding behind made up claims about objective truths on this matter |
13:40:13 | FromGitter | <kaushalmodi> It was never an objective claim. |
13:41:14 | Araq | yeah, I should use 'one' more than the unpersonal 'you' |
13:42:05 | * | leorize1 joined #nim |
13:42:25 | Araq | so ... are only 'and' and 'or' affected? |
13:43:53 | FromGitter | <kaushalmodi> I believe any binary operator would apply (thinking which else..). In general, yes, it's usually`and` and `or`. |
13:44:31 | FromGitter | <kaushalmodi> Could also be `&` for string Concat |
13:44:56 | FromGitter | <kaushalmodi> Or `+`, etc for long math expressions |
13:45:19 | Araq | cause if we really consider it, I would in fact vote for: |
13:45:28 | Araq | if foo |
13:45:31 | Araq | and bar: |
13:45:36 | Araq | echo "note the indentation" |
13:45:44 | FromGitter | <kaushalmodi> (and I am thinking more, I am recalling all those actual use cases) |
13:46:26 | Araq | but that only makes sense for 'and' and 'or' |
13:46:46 | FromGitter | <kaushalmodi> Here's an & example: |
13:46:58 | FromGitter | <kaushalmodi> echo "dgdhd" |
13:47:05 | FromGitter | <mratsim> for SQL I alsays use: ⏎ ⏎ ```select * from footer ⏎ where 1=1 ⏎ and col1 = ‘foo’ ⏎ and col2 = ‘bar’``` [https://gitter.im/nim-lang/Nim?at=5b44b8d87b811a6d63df4610] |
13:47:06 | FromGitter | <kaushalmodi> & "Jdjdh" |
13:48:13 | FromGitter | <kaushalmodi> @mratsim Yay for one more supporter :) |
13:48:15 | Araq | mratsim: that seems a different problem, infix based syntax doesn't compose well |
13:48:43 | Araq | but maybe that's the "editability" aspect of it |
13:48:46 | FromGitter | <mratsim> I’m not really for or against. |
13:49:18 | FromGitter | <mratsim> My main grip is the “””, it becomes very strange when you go next line. |
13:49:21 | FromGitter | <kaushalmodi> Thanks, "not against" is good |
13:50:09 | FromGitter | <mratsim> for me it’s more natural to have the operator at the beginning of the line, that may be because of bullet points. |
13:50:43 | FromGitter | <mratsim> but for editability you can just have a dummy true or empty stuff for the first condition |
13:50:44 | Araq | iirc Google's style guide says to put it at the line end |
13:50:50 | FromGitter | <mratsim> or in the second case for the last condition |
13:51:15 | FromGitter | <mratsim> Google style guide for C++ or for Python? |
13:51:21 | Araq | for C++ |
13:51:51 | * | nc-x joined #nim |
13:51:52 | FromGitter | <mratsim> I don’t want to have a Frankenstein language of Python + C++ rules :P |
13:52:37 | nc-x | Anyone has any experience with this error (application crashing, not compiler)? https://pastebin.com/WVNnhSMF |
13:52:45 | Araq | well I took Python and improved it, ', \' is ridiculous, this can be ',' |
13:53:05 | Araq | and the rest followed from consistency considerations... |
13:53:18 | FromGitter | <kaushalmodi> Can we quote arbitrary style guides? https://news.ycombinator.com/item?id=7976103 |
13:53:52 | Araq | tbh |
13:54:04 | Araq | this proposal doesn't work well with anything but 'and' and 'or' |
13:54:14 | Araq | & foo is a unary operator |
13:54:21 | Araq | bar & foo is a binary operator |
13:54:32 | FromGitter | <tim-st> when I need to find out if the target os is 32bit or 64 should I do this over int size? |
13:54:40 | FromGitter | <kaushalmodi> Better link: https://www.gnu.org/prep/standards/html_node/Formatting.html |
13:55:02 | Araq | nc-x: init your tables |
13:55:21 | FromGitter | <mratsim> I’m trying to check into the canonical Google lib, they indeed seem to use then EOL: https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/thread_identity.cc#L104-L105 |
13:55:50 | nc-x | Araq: I think I have done it. It works with small values. This issue only occurs if I have some large value. |
13:55:53 | FromGitter | <mratsim> but what are Pascal/Python rules here? |
13:56:46 | nc-x | What I have done is http://craftinginterpreters.com/resolving-and-binding.html and after that I am trying to run a simple lox fibonacci program. For small values it works okay, for large value, about fibonacci(30) I get this crash |
13:56:58 | nc-x | Araq: ^^^ |
13:57:11 | Araq | out of memory? |
13:57:13 | FromGitter | <mratsim> fibonacci 20 doesn’t fit in an int64 you know |
13:57:23 | nc-x | I have float64 |
13:57:30 | FromGitter | <mratsim> i don’t even know how big fibonacci30 is |
13:57:51 | FromGitter | <kaushalmodi> That HN thread has some good examples showing better readability if operators are at beginning of line. It's nice for people who like aligned operators. |
13:58:05 | FromGitter | <mratsim> hmmm no sorry I’m confusing with factorial |
13:58:16 | nc-x | Araq: I have lots of memory available, so thats not the issue... This is a bug in my code or nim. Idk. |
13:59:13 | nc-x | To add over to the pain, I have absolutely no tests in the code :P |
13:59:39 | FromGitter | <tim-st> does this code find out arch `when int.sizeof <= int32.sizeof` ? |
14:00:38 | PMunch | Ugh, this dynamic loading this just won't work.. The nimrtl appears to be seriously broken.. |
14:05:24 | nc-x | What is this error now? gc.nim(471) newObjNoInit, alloc.nim(776) rawAlloc, SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
14:05:46 | Araq | PMunch: possible |
14:05:55 | FromGitter | <mratsim> can you show us how you initialize you table @nc-x? |
14:06:34 | nc-x | @mratsim The code is pretty big. It is a complete interpreter. |
14:07:00 | nc-x | **incomplete interpreter |
14:07:32 | FromGitter | <mratsim> we can’t debug with just this stack trace, it seems like you are using a table that is not properly initialized. |
14:07:54 | FromGitter | <mratsim> either it or the things contained inside |
14:08:03 | FromGitter | <mratsim> or the key maybe |
14:08:41 | PMunch | Araq, so if I get this right the idea is that the nimrtl dynlib should contain all the GC stuff and keep the GC state. Every plugin and the main program should then call the procedures from this library in order to have one unified GC state? |
14:08:48 | nc-x | Yeah, I will try to debug a bit more and then I will commit the code as-it-is to ask for help in debugging |
14:09:27 | FromGitter | <mratsim> you might be missing an initTable or a newTable or a newYourRefType somewhere |
14:09:42 | FromGitter | <mratsim> or new result |
14:20:17 | FromGitter | <kaushalmodi> Araq: About the unary vs binary &, if the & is indented, wouldn't it be interpreted as binary? |
14:20:49 | FromGitter | <mratsim> it depends on the preceding token |
14:20:58 | FromGitter | <kaushalmodi> Hmm, yeah.. |
14:21:19 | FromGitter | <mratsim> you can have “foo” & & “bar{strformatvariable}" |
14:21:38 | FromGitter | <mratsim> the first one is infix, the second one is prefix |
14:24:33 | * | cryptocat1094 joined #nim |
14:27:28 | * | endragor quit (Remote host closed the connection) |
14:32:06 | * | endragor joined #nim |
14:33:44 | * | NimBot joined #nim |
14:34:54 | Araq | PMunch: yes |
14:36:27 | * | endragor quit (Ping timeout: 240 seconds) |
14:38:57 | nc-x | @mratsim, Araq: Well my issue got solved by --gc:markAndSweep, no idea how or why. |
14:39:09 | * | nsf quit (Quit: WeeChat 2.1) |
14:39:15 | FromGitter | <mratsim> are you using stable or devel? |
14:39:34 | nc-x | devel |
14:40:10 | FromGitter | <mratsim> strange. I thought memory alloc issue for big chunks were solved in March |
14:42:44 | nc-x | Well it could very well be an issue in my code that markandsweep gc is ignoring. But as long as it is working fine, I am happy. When it breaks down, then we'll see. :D |
14:44:46 | PMunch | Araq, found something interesting. Compile the dll loader with --gc:boehm and the plugins with --gc:boehm --app:lib and it seems to work just fine |
14:45:12 | PMunch | Doesn't appear to leak memory either |
14:45:48 | PMunch | But I'm going to go home now. Be back on in about half an hour |
14:45:49 | * | PMunch quit (Quit: Leaving) |
14:47:27 | * | nc-x quit (Quit: Page closed) |
14:47:59 | krux02 | Araq: are you shure tools is the right folder for nim-gdb.py? |
14:48:08 | krux02 | it is not a tool that is built using any nim tool |
14:48:22 | Araq | check where I put the valgrind config, I don't remember |
14:49:05 | Araq | "tools" / "nimgrind.supp" |
14:49:13 | Araq | so tools/ is fine |
14:49:43 | shashlick | what is nim-gdb.py |
14:50:26 | * | nc-x joined #nim |
14:52:45 | * | Perkol quit (Quit: Leaving) |
14:54:07 | * | leorize1 is now known as leorize |
14:54:45 | * | nc-x quit (Ping timeout: 252 seconds) |
14:56:38 | * | donzx joined #nim |
14:57:40 | krux02 | shashlick, it is a python script that tells gdb how data structures look like in nim, how to access the children and how to print them. |
14:58:03 | krux02 | shashlick, basically it allows to use a debugger like you would want to use it. |
14:58:21 | FromGitter | <tim-st> @data-man I'd like to use your `nimsnappyc`to support native db value compression but it returns `seq[byte]` where I expect string or cstring, is there a trick to use this type without conversion? |
14:59:32 | * | donlzx quit (Ping timeout: 276 seconds) |
14:59:44 | shashlick | krux02: why python? |
15:00:00 | krux02 | shashlick, the alternative would have been guile |
15:00:35 | krux02 | it is a script plugin for gdb. And gdb supports guile and python. |
15:00:45 | shashlick | ok understand |
15:00:54 | FromGitter | <alehander42> @krux02 I can add a table pretty printer based on our internal scripts |
15:01:06 | FromGitter | <alehander42> I didn't see one on my first look |
15:01:13 | krux02 | alehander42 I have already a table pretty printer |
15:01:25 | FromGitter | <alehander42> ah, ok, I must've missed it |
15:01:42 | krux02 | well are you looking at the right nim-gdb.py? |
15:01:44 | krux02 | probably not |
15:02:07 | FromGitter | <alehander42> I was looking at https://github.com/krux02/Nim-gdb |
15:02:20 | FromGitter | <alehander42> ah that's a fork |
15:02:31 | krux02 | https://github.com/krux02/Nim/blob/gdb-pretty-printers/gdb/nim-gdb.py |
15:02:48 | krux02 | I want it in the official repo |
15:03:08 | krux02 | so that when you clone Nim, it is there |
15:04:16 | krux02 | it is still not automatically loaded, but yea that is a tough one, because gdb has thousand switching to disable automatic loading and the tutorials only explain how disable automatic loading, not how to enable it. |
15:04:21 | FromGitter | <alehander42> as far as I remember OrderedSet is pretty similar to HashSet in my implementation |
15:04:29 | FromGitter | <alehander42> it shared code at least |
15:06:32 | * | fjvallarino quit (Remote host closed the connection) |
15:09:42 | * | fjvallarino joined #nim |
15:10:05 | FromGitter | <alehander42> I think |
15:10:22 | FromGitter | <alehander42> ```python ⏎ ⏎ yourcode``` ⏎ ⏎ is ~/.gdbinit makes it possible [https://gitter.im/nim-lang/Nim?at=5b44cc5e60c38707836d811f] |
15:10:43 | FromGitter | <alehander42> one can also put it in local .gdbinit but then it needs special rule in ~/.gdbinit i think |
15:11:14 | FromGitter | <alehander42> anyway, that's still not perfect, as it loads for each file this way |
15:11:24 | FromGitter | <alehander42> even non-nim based binaries |
15:15:44 | FromGitter | <xDotDash> Is there a way to generate a documentation reference to a type, from, say, a proc? |
15:22:51 | * | fjvallarino quit (Remote host closed the connection) |
15:26:37 | krux02 | xDotDash: I have no idea what exactly you want. |
15:26:51 | krux02 | do you want the documentation of a type or do you want the documentation of a proc? |
15:27:33 | FromGitter | <xDotDash> Similar to how java has `{@link Type}` for Javadocs, I want to be able to link users of my library to it directly |
15:28:46 | FromGitter | <xDotDash> So it is a clickable link that takes the user to the Type |
15:28:51 | krux02 | ok that you mean. I am sorry I think there is no official way to make real references in the documentation commants yet. I normally use ``Type`` |
15:29:00 | FromGitter | <xDotDash> Ah ok, thanks |
15:38:18 | krux02 | if nim would compile to libstdnim.so, we could ship a libstdnim-gdb.py along the library, and gdb would load it automatically. |
15:44:44 | krux02 | Araq: is there a nim command that just echos the path of the nim directory with the sources and eventually nim-gdb.py |
15:46:17 | * | fjvallarino joined #nim |
15:47:16 | * | leorize quit (Ping timeout: 256 seconds) |
15:52:38 | stefanos82 | bloody hell...Google is screwing us right now. It does not let me sign in my gmail without providing my phone number. I don't want to give them my phone number for heaven's sake! |
15:56:56 | * | leorize joined #nim |
15:57:25 | FromGitter | <tim-st> stefanos82: I had this before and got it skipped by using other browser |
15:57:38 | stefanos82 | I have tried both Firefox and Chrome |
15:57:52 | stefanos82 | the same thing. The entire Gmail outlook changed |
15:57:57 | stefanos82 | which means they have applied new rules |
15:58:36 | FromGitter | <tim-st> ok, then maybe they think the people are pushed enough in this direction to give everything now |
15:58:55 | * | rockcavera joined #nim |
15:59:04 | FromGitter | <tim-st> maybe with javascript off |
15:59:22 | stefanos82 | if they are forcing me to provide my phone number, I will simply close the account |
15:59:25 | stefanos82 | as simple as that. |
15:59:35 | FromGitter | <tim-st> yes, me too, I hate tat |
15:59:38 | FromGitter | <tim-st> *that |
16:00:20 | FromGitter | <tim-st> and they dont even tell what's about, they say "for better security" lol |
16:00:53 | * | subsetpark joined #nim |
16:02:51 | stefanos82 | for F***'s sake, now it labels it as account RECOVERY! |
16:03:02 | stefanos82 | what the actual hell Google@ |
16:03:03 | stefanos82 | ! |
16:03:29 | stefanos82 | I don't even owe an Android |
16:03:34 | FromGitter | <tim-st> ah, yes, that was exactly the thing they told me too^^ |
16:03:35 | stefanos82 | I use a Linux desktop computer |
16:04:21 | * | leorize quit (Ping timeout: 240 seconds) |
16:05:20 | stefanos82 | so, in other words, I won't be even able to close my Gmail account thanks to this retarded thing |
16:05:28 | stefanos82 | way to go Google, you did it again! |
16:10:35 | * | noonien joined #nim |
16:16:01 | * | leorize joined #nim |
16:22:12 | stefanos82 | man, this is a comedy right now...they send me emails on my secondary email that they have blocked an unauthorized access by my own Gmail account! |
16:22:30 | stefanos82 | please tell me their ML messed up badly their entire infrastructure |
16:23:22 | * | fjvallarino quit (Remote host closed the connection) |
16:26:03 | * | Vladar quit (Remote host closed the connection) |
16:26:28 | * | Vladar joined #nim |
16:32:22 | FromGitter | <mratsim> embrace, extend, extinguish? |
16:36:28 | stefanos82 | you want to know the shitty part mratsim? |
16:36:34 | stefanos82 | they asked me for my recovery email |
16:36:37 | stefanos82 | I gave it to them |
16:36:51 | stefanos82 | they created a new gmail account that ends with .yahoo.com |
16:36:54 | stefanos82 | WHAT?! |
16:38:43 | FromGitter | <k0pernicus> ... |
16:38:56 | FromGitter | <k0pernicus> That's. |
16:38:58 | FromGitter | <k0pernicus> Very. |
16:39:01 | FromGitter | <k0pernicus> Strange. |
16:39:56 | FromGitter | <k0pernicus> Are you sure Google asked you this? |
16:40:08 | FromGitter | <k0pernicus> I mean: are you sure it's Google? |
16:41:52 | stefanos82 | lol yea |
16:41:54 | stefanos82 | gmail.com |
16:42:20 | stefanos82 | I have even received emails from [email protected] with my verification code |
16:42:30 | stefanos82 | oh they messed up so bad lol |
16:42:44 | stefanos82 | now I want 10 times to delete any Google account I may have |
16:47:21 | * | PMunch joined #nim |
16:50:36 | FromGitter | <alehander42> nope, it might seem it's from gmail.com but to be actually from somewhere else |
16:51:57 | FromGitter | <alehander42> "forging headers" I think |
16:53:02 | * | miran_ joined #nim |
16:54:39 | FromGitter | <alehander42> so the `from` field can contain all kinds of fake info ⏎ e.g. https://www.howtogeek.com/121532/htg-explains-how-scammers-forge-email-addresses-and-how-you-can-tell/ |
16:55:06 | FromGitter | <alehander42> I also didn't know that, but make sure that's authentic |
16:55:36 | stefanos82 | they have fixed my issue and sent me an email |
16:55:59 | * | donzx quit (Quit: Leaving) |
16:57:16 | * | fjvallarino joined #nim |
16:57:43 | FromGitter | <alehander42> hm, still the yahoo.com thing sounds very suspicious |
16:58:51 | stefanos82 | don't worry. I'm backing up my emails and deleting the account. |
16:58:53 | stefanos82 | I have had enough |
16:59:34 | * | nsf joined #nim |
17:01:21 | * | fjvallarino quit (Remote host closed the connection) |
17:01:28 | * | fjvallarino joined #nim |
17:12:21 | stefanos82 | done |
17:23:56 | * | ng0 joined #nim |
17:28:07 | FromGitter | <alehander42> well, still you have to be sure it's deleted without leaking to a third person account |
17:31:37 | * | vivus joined #nim |
17:38:02 | stefanos82 | they can do whatever they want. it's just an email without access to any bank account or whatsoever. besides, I don't have money, like at all! hahahaha ^_^ |
17:41:49 | * | PMunch quit (Quit: leaving) |
17:49:08 | FromGitter | <Varriount> But they might be able to ruin your reputation. |
17:51:42 | * | Cthalupa- quit (Ping timeout: 260 seconds) |
17:51:42 | stefanos82 | which reputation? |
17:51:58 | stefanos82 | I guess I'm lucky I have no friends :D |
17:52:02 | * | Cthalupa joined #nim |
17:52:06 | stefanos82 | long live my hermit life! |
17:54:37 | krux02 | this took longer that I hoped: https://github.com/nim-lang/Nim/pull/8263 |
17:55:03 | krux02 | but when it gets accepted, finally easy to use gdb support |
17:55:19 | shashlick | @mratsim: would you be open to changing nim-clblast to look like a standard nimgen project? i would like to add it to the nimgen test matrix |
17:55:21 | krux02 | easy nim debugging (for unix systems) |
17:55:26 | FromGitter | <k0pernicus> Youhou! \o/ |
17:55:39 | FromGitter | <k0pernicus> Very cool @krux02 :) |
17:56:00 | krux02 | sorry I mean posix systems |
17:56:23 | krux02 | I know unix only as a legend that was the mystical predecessor to Linux |
17:56:28 | krux02 | and from Jurassic Park |
17:56:42 | FromGitter | <k0pernicus> Jurassic Park, oh yé… |
17:57:23 | FromGitter | <k0pernicus> "It's Unix… I know this system Tim…" |
17:57:39 | FromGitter | <k0pernicus> *click* *click* |
17:57:44 | krux02 | ok I have to go |
17:58:00 | * | krux02 quit (Remote host closed the connection) |
18:01:33 | * | Cthalupa quit (Ping timeout: 264 seconds) |
18:03:31 | * | Cthalupa joined #nim |
18:14:33 | subsetpark | @dom96: nimble question for you. i can have a requirements 'requires "[email protected]:foo/bar"' - but can I specify a tag there? |
18:15:06 | dom96 | yes |
18:15:11 | dom96 | #your-tag |
18:15:30 | dom96 | but if you want a version then just specify it |
18:16:25 | skrylar | yay, nblosc is in nimble |
18:16:30 | skrylar | now to add firebird and fltk |
18:18:03 | * | miran_ is now known as miran |
18:20:20 | subsetpark | dom96: specify it like "URL 0.1.1" ? |
18:20:26 | dom96 | yeah |
18:20:41 | subsetpark | oh hm, that works! It ddn't work last time I ried it :) |
18:21:08 | FromGitter | <metasyn> hello everyone~ my company has a hack week this week and i decided to do mine in nim |
18:21:16 | skrylar | congrats |
18:21:19 | dom96 | awesome |
18:21:36 | FromGitter | <tim-st> @dom96 is every import name in nimble unique? I mean if this one already exists should I use another one? |
18:21:43 | dom96 | yes |
18:21:48 | FromGitter | <tim-st> :( |
18:22:12 | FromGitter | <metasyn> we have this weird internal serialization protocol, so i'm writing the interface for it in nim so people can interact with our software (splunk) via nim |
18:22:35 | FromGitter | <metasyn> i'm running into something weird that i'm sure is really basic... basically i'm reading a line form stdin, but it hands even when I check for `endOfFile()` |
18:22:45 | skrylar | i actually think you should be using git submodules tbh, because they will be pinned to the exact version that is known to work with your project :F |
18:23:17 | dom96 | skrylar: No need for submodules. Nimble can pin packages too |
18:24:05 | dom96 | metasyn: gist your code |
18:24:15 | skrylar | dom96, nimble also doesn't work >:( |
18:24:26 | dom96 | skrylar: hrm? |
18:24:42 | * | skrylar *still* has to perform the operations of `nimble publish` by hand |
18:25:27 | FromGitter | <metasyn> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b44fa173c5abf52b64c015d] |
18:25:27 | * | Trustable joined #nim |
18:25:30 | skrylar | regardless. have to figure out a satisfying way of testing for breakages |
18:25:43 | skrylar | considering if its worth figuring out lxc/lxd for it |
18:25:44 | dom96 | So a specific Nimble feature doesn't work, not all of Nimble |
18:26:19 | dom96 | metasyn: maybe endOfFile is broken, readLine should work |
18:28:19 | FromGitter | <metasyn> Hm, I try just replacing that with readLine - it seems like either its reading forever or it never encounters an EOF ? |
18:33:24 | dom96 | It's reading the lines correctly, right? |
18:34:07 | FromGitter | <metasyn> it does on the first exchange, but the second exchange it seems to just hang on reading, e.g. the log just stops at "Reading chunk..." and I have to kill the process |
18:34:49 | dom96 | Are you just doing `readLine` in a loop? |
18:36:19 | FromGitter | <metasyn> it first does readLine to get information about how much more to read, the payload size. after that i use readChars since I know how many bytes i need to read |
18:36:45 | dom96 | okay, so that's a different problem :) |
18:37:18 | dom96 | readChars could be the problem then, test it to be sure |
18:37:59 | FromGitter | <metasyn> I see - the reason I thought it was at the point above is because the logging will stop at that point, so i didn't think readChars was involved |
18:40:09 | dom96 | It could be multiple things. endOfFile on stdin could be broken too |
18:40:17 | miran | dom96: please moderate this topic: https://forum.nim-lang.org/t/4031 (one reply is hidden) |
18:40:44 | dom96 | miran: thanks |
18:40:51 | miran | np :) |
18:42:14 | CodeVance | Its me |
18:42:16 | CodeVance | I changed my email |
18:43:13 | dom96 | metasyn: I just tested it. It seems that endOfFile waits for data on stdin before returning |
18:43:41 | dom96 | So you should probably only call it when you're about to read data from stdin |
18:43:49 | dom96 | readChars seems to be working fine for me |
18:43:58 | FromGitter | <metasyn> I see |
18:44:21 | FromGitter | <metasyn> https://conf.splunk.com/files/2016/slides/extending-spl-with-custom-search-commands-and-the-splunk-sdk-for-python.pdf ⏎ ^ for context, i'm trying to write the parser for slides 21-22 |
18:45:56 | dom96 | Is the data always sent via stdin? |
18:46:18 | FromGitter | <metasyn> yeah |
18:46:54 | CodeVance | Can't esacpe EOF? |
18:47:26 | FromGitter | <rayman22201> Is there a known behavior that the js backend produces a different result for `cstring.len` than the c backend? |
18:47:57 | CodeVance | doesn't cstring in js just use js's string? |
18:48:07 | FromGitter | <rayman22201> yes |
18:48:36 | FromGitter | <rayman22201> and on the js backend it does what I expect. lol |
18:48:47 | CodeVance | So then yes |
18:48:59 | FromGitter | <rayman22201> the c backend seems to produce len - 1 |
18:49:08 | FromGitter | <rayman22201> this is on devel btw |
18:49:09 | CodeVance | cstring for c uses c's string |
18:49:11 | dom96 | rayman22201: that's a bug |
18:49:38 | FromGitter | <rayman22201> yay 🎆 |
18:49:51 | * | smt joined #nim |
18:50:25 | FromGitter | <rayman22201> Is it related to the new destructor based strings in the c backend? |
18:50:41 | FromGitter | <rayman22201> There is probably no way to know that. stupid question |
18:50:48 | FromGitter | <tim-st> how can I check if a c compiler is used for compilation? |
18:51:19 | FromGitter | <rayman22201> `nim c` = use a c compiler. `nim js` make js files |
18:51:36 | skrylar | i think tim means 'when defined(???)' |
18:51:43 | FromGitter | <rayman22201> oh, lol |
18:52:09 | FromGitter | <tim-st> yes, skrylar |
18:52:45 | CodeVance | when not defined(js) I think |
18:53:28 | FromGitter | <tim-st> no this allows c++ |
18:53:47 | FromGitter | <tim-st> I think when compiles(some c header test proc) |
18:53:50 | FromGitter | <rayman22201> There is a list of all the compiler defined constants that you can use when on somewhere. I'm trying to remember where |
18:54:17 | dom96 | I'm guessing `when defined(cc)`` |
18:54:43 | FromGitter | <tim-st> dom96: thanks |
18:55:09 | dom96 | It sure would be nice if `system` contained a `Backend` constant :) |
18:55:35 | FromGitter | <tim-st> dom96: when defined(cc) doesnt work |
18:55:53 | dom96 | `defined(c)`? I don't know, I'm guessing here. IIRC C++ is: defined(cpp) |
18:56:16 | dom96 | Why do you want to detect `C` only? |
18:56:31 | FromGitter | <tim-st> because my lib is c only |
18:57:11 | dom96 | How can it be C-only? |
18:57:31 | FromGitter | <tim-st> it wraps c source code |
18:57:39 | dom96 | C++ can use C libraries |
18:58:14 | FromGitter | <tim-st> ok, didnt know that |
18:59:14 | * | bozaloshtsh quit (Ping timeout: 256 seconds) |
19:00:48 | * | cryptocat1094 quit (Ping timeout: 244 seconds) |
19:00:54 | Araq | when not defined(cpp) and not defined(js) and not defined(objc) # yeah ... I know, it sucks |
19:00:57 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
19:01:30 | FromGitter | <tim-st> and not defined(nimscript) but when gpp can compile it too, I dont care |
19:01:33 | * | yglukhov[i] joined #nim |
19:01:49 | FromGitter | <rayman22201> Are there any major roadblocks to js sourcemaps being implemented? That idea seems to have died. |
19:01:55 | FromGitter | <tim-st> or if copyMem exists |
19:03:09 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
19:03:43 | * | yglukhov[i] joined #nim |
19:05:20 | shashlick | skrylar: have you tried nimgen? |
19:05:58 | * | Cthalupa quit (Ping timeout: 244 seconds) |
19:06:04 | Araq | rayman: it's not dead but it's a "champion" to clean it up |
19:06:10 | Araq | *but it needs |
19:08:05 | * | Cthalupa joined #nim |
19:08:18 | shashlick | Araq: what are your main distractions to get to 1.0? Anything the community can do to alleviate |
19:08:57 | FromGitter | <rayman22201> @Araq Where does the unfinished sourcemap code currently live? |
19:09:07 | FromGitter | <rayman22201> also good question from @slashlick |
19:14:59 | FromGitter | <tim-st> Already wanted to use this style a few times in my code: https://github.com/nim-lang/Nim/issues/8258 |
19:15:24 | skrylar | shashlick, what about it |
19:15:39 | * | birdspider joined #nim |
19:16:04 | FromGitter | <kaushalmodi> @tim-st Looks like it's not going to happen.. looks like the whole of the core team disagrees |
19:17:01 | shashlick | skrylar: curious if you could try it for your next wrapper, you mentioned firebird and fltk |
19:18:21 | FromGitter | <tim-st> @kaushalmodi maybe not now, but when nim gets a bigger audience more people will say the same |
19:19:18 | * | nc-x joined #nim |
19:19:42 | FromGitter | <tim-st> I think even when I used pycharm and pressed format it autoformatted to the style that is prohibited in nim |
19:20:01 | nc-x | @tim-st well, most of the go programmers have been asking for generics, yet they still didn't get it ;) |
19:20:17 | Araq | shashlick: well ... apart from fixing bugs |
19:20:24 | FromGitter | <tim-st> they dont get it because of compile times, which is in fact a good reason |
19:20:44 | Araq | finishing --incremental:on would be most important. |
19:20:45 | nc-x | Well D and nim havd pr |
19:20:56 | nc-x | pretty fast compile times even with generics |
19:21:22 | FromGitter | <tim-st> nims compile times are currently not compareable to go |
19:21:49 | FromGitter | <tim-st> I didnt used d but I read people said d has problems compiling bigger projects and it uses tons of memory |
19:21:56 | Araq | huh? I recently compiled Go code on Windows and it was slower than Nim's compile times |
19:22:13 | Araq | in fact |
19:22:21 | Araq | I was suprised by its poor performance |
19:22:35 | Araq | but maybe it's just a windows specific problem |
19:22:36 | nc-x | I think with a opinionated nimpretty would be an end to these types of issues |
19:22:36 | FromGitter | <tim-st> maybe a small source code and the first compilation |
19:22:48 | nc-x | I have the same experience as that of Araq |
19:23:37 | subsetpark | dom96: Is it possible that there is a bug in nimble when nimble.ini only has `cloneUsingHttps = false`? |
19:23:50 | FromGitter | <tim-st> but I think it is quite possible to make nims compile times quicker than go, it needs just a cache technique that works |
19:24:07 | Araq | we have one in the works :P |
19:24:20 | dom96 | subsetpark: dunno, anything is possible |
19:24:37 | Araq | it's a pretty solid design, so hopefully only implementation bugs will crop up |
19:24:45 | Araq | and not design bugs... |
19:25:21 | FromGitter | <tim-st> Araq: does it understand between release mode and debug mode, and between different nimcache folders of different architectures, can it prove files that can be reused? |
19:25:24 | shashlick | Araq: well, ya we can work on bugs but if there's specific things on your plate that we can offload, we can try |
19:26:02 | FromGitter | <tim-st> I would need more knowledge of e.g. c's *.o files when can these be used again etc |
19:27:10 | subsetpark | dom96: yeah, pretty sure. |
19:28:26 | Araq | tim-st: yes, it does. also you can use release vs debug specific --nimcaches |
19:28:29 | Araq | koch does that. |
19:28:46 | FromGitter | <tim-st> does it also reuse the *.o files? |
19:28:53 | Araq | yes. |
19:29:01 | FromGitter | <tim-st> ok, that sounds good |
19:29:03 | Araq | it also runs the C compiler in parallel |
19:29:08 | Araq | uses all of your cores |
19:29:30 | Araq | but IC (incremental compilation) is about the frontend "caching" |
19:29:37 | FromGitter | <tim-st> so in best case some phases of gcc can be skipped? |
19:30:04 | Araq | just try it, usually only a couple of C files are recompiled |
19:30:14 | FromGitter | <tim-st> with devel? |
19:30:28 | FromGitter | <tim-st> I have fear using devel, last time nimsuggest went to 100% |
19:30:32 | Araq | with 0.18 too |
19:30:36 | shashlick | https://github.com/nim-lang/nim/issues/6220 <= no longer crashes, can someone check and close this? |
19:30:53 | FromGitter | <tim-st> do I need som extra compilation paramters? |
19:31:56 | shashlick | https://github.com/nim-lang/nim/issues/6453 <= same for this |
19:32:40 | FromGitter | <tim-st> at my current version all files are in the same nimcache folder, I think that can be a problem |
19:33:08 | shashlick | https://github.com/nim-lang/nim/issues/6671 <= one more that's fixed |
19:33:14 | FromGitter | <tim-st> especially c wrapped sources dont get a prefix |
19:33:29 | Araq | tim-st so ... use --nimcache ? |
19:33:59 | FromGitter | <tim-st> last time I wanted to do that someone said I shouldnt, it's not stable |
19:38:05 | Araq | well koch uses it so it's used on a daily basis |
19:38:33 | * | nc-x quit (Ping timeout: 252 seconds) |
19:39:09 | shashlick | testament also uses it right |
19:39:57 | FromGitter | <tim-st> but from what I see all files come in one nimcache folder and they are not seperated like in go's caching they use subfolders exactly how the subfolders are in the source code |
19:40:12 | FromGitter | <tim-st> the current way allows overwriting of same named files I think |
19:40:23 | FromGitter | <tim-st> only stdlib has prefix |
19:40:29 | Araq | why would subfolder improve "caching"? |
19:40:47 | Araq | no, every nimble package gets a prefix, but that's also not the point. |
19:41:07 | Araq | the prefixes are a about clashes, but the topic is "caching" |
19:41:33 | FromGitter | <tim-st> because of overwriting and additonally the chance is higher that the already cached version fits better like release/debug mode and arch version |
19:42:39 | FromGitter | <tim-st> when I have `main.c` from different folders, both taking 10minutes to compile, only one is always cached? |
19:45:15 | * | Trustable quit (Remote host closed the connection) |
19:52:11 | stefanos82 | dom96: I have tried the jester demo from your book and got the following error message: http://paste.debian.net/hidden/a1f05261/ |
19:53:27 | dom96 | Damn, maybe I shouldn't have tagged 0.3.0 indeed :/ |
19:54:18 | stefanos82 | so, what should I do? |
19:54:22 | stefanos82 | any suggestions? |
19:54:40 | stefanos82 | maybe replace the >= 0.0.1 with >= 0.30.0 instead? |
19:54:52 | stefanos82 | *0.3.0? |
19:54:53 | dom96 | You're almost there |
19:54:59 | dom96 | < 0.3.0 |
19:55:02 | stefanos82 | OK |
19:55:10 | dom96 | or just `jester 0.2.1` |
19:55:18 | stefanos82 | that should do. |
19:56:09 | stefanos82 | hello world ^_^ |
19:57:37 | stefanos82 | so, when we interrupt it with Ctrl-C, should we consider such messages "Error: Execution failed with exit code 130" as normal? |
19:57:37 | dom96 | Araq: When can we release 0.19.0? :) |
19:57:45 | dom96 | stefanos82: yes |
19:57:51 | stefanos82 | dom96: lovely |
19:58:55 | Araq | dom96: maybe in August |
19:59:38 | dom96 | Araq: :/ |
20:04:36 | FromGitter | <kayabaNerve> @alehander42 it was a joke based on Varriount not wanting fatally flawed features. I think removing int counted. |
20:05:59 | * | lompik quit (Ping timeout: 260 seconds) |
20:20:08 | Araq | https://docs.swift.org/swift-book/LanguageGuide/MemorySafety.html oh look, Swift has a borrow checker |
20:20:29 | Araq | and globals are different from locals |
20:20:46 | Araq | and they probably have something like .gcsafe too then. |
20:26:34 | * | yglukhov[i] quit (Remote host closed the connection) |
20:27:35 | dom96 | That really makes Swift seem complicated to me |
20:46:47 | Araq | well we need the similar rules for proving memory safety |
20:47:52 | Araq | for the "new runtime" (which is more and more a patch to the existing technology) |
20:48:07 | Araq | (but that's a good thing, risk mitigation) |
20:52:04 | * | miran quit (Ping timeout: 260 seconds) |
21:01:01 | * | nsf quit (Quit: WeeChat 2.1) |
21:01:08 | FromDiscord | <exelotl> wait a minute, is that URL what I think it is https://media.discordapp.net/attachments/423232256350486539/466347570319458304/PSX_20180710_225726.jpg |
21:01:23 | * | yglukhov[i] joined #nim |
21:03:57 | * | birdspider quit (Ping timeout: 240 seconds) |
21:05:58 | * | birdspider joined #nim |
21:08:37 | * | noonien quit (Quit: Connection closed for inactivity) |
21:11:40 | * | bozaloshtsh joined #nim |
21:12:52 | * | bozaloshtsh quit (Changing host) |
21:12:52 | * | bozaloshtsh joined #nim |
21:13:29 | * | vivus quit (Quit: Leaving) |
21:20:52 | FromGitter | <tim-st> when getting memory safety is only possible via a complex syntax, then I would prefer having no memory safety. Though I think in theory it should be possible to let the compiler determine everything without having the user type these complex syntax like in rust |
21:21:58 | * | bozaloshtsh quit (Quit: ZNC 1.7.0 - https://znc.in) |
21:22:07 | * | bozaloshtsh joined #nim |
21:22:25 | * | bozaloshtsh quit (Changing host) |
21:22:25 | * | bozaloshtsh joined #nim |
21:22:52 | Araq | I haven't said anything about syntax |
21:23:28 | FromGitter | <tim-st> So you want to get memory safety without changing the syntax? |
21:26:32 | Araq | depends on what counts as "changing the syntax". some additions like 'lent T' and 'sink T' are required but mostly affect the stdlib |
21:26:55 | FromGitter | <tim-st> why are these required? |
21:27:21 | Araq | speed. conceptual clarity. |
21:27:28 | FromGitter | <tim-st> is there no way for the compiler to calculate/prove the correct ones? |
21:27:56 | FromGitter | <tim-st> IMO this is already too much |
21:28:01 | Araq | there is, but that gets us into "sufficiently smart compiler" territory |
21:28:58 | skrylar | had pondered a way around that but its not tested so i don't know if it would work. basically had to do with the concept of a compiler that runs its own interpreter, with a marker for running in there (like the >php> tags maybe); but the thing of relevance was the idea that every object had an "orbit" bag where you could shove things that were only valid during compilation |
21:29:03 | FromGitter | <tim-st> I think it would be ok, if these were optional, so people who dont use it and stay with normal syntax just dont have memory safety |
21:29:41 | Araq | tim-st: the people who don't use it get slower programs, but the same safety |
21:30:07 | skrylar | the hope was you could implement your own special keywordy things by having them put metadata "in orbit" instead of having a ton of special cases; but there'd probably be issues propagating them (i dunno, but it seemed neat) |
21:30:26 | FromGitter | <tim-st> ah, nice, so as long as the old way is supported and the new one is not too bad like in rust everything is fine |
21:30:32 | Araq | IMO that's a fair tradeoff. write declarative stuff to get more speed. (It's not imperative code) |
21:31:14 | FromGitter | <tim-st> also I dint think nim is much slower than rust, benchmarks show they are very similiar although rust devs invests hours in finding the right lifetime parameters |
21:35:57 | * | birdspider quit (Quit: Leaving) |
21:36:43 | Araq | it's not really about speed. |
21:37:38 | Araq | it's about guarantees and positioning Nim for embedded development or hard realtime systems |
21:38:24 | FromGitter | <tim-st> ok, for me it's only important that syntax doesnt change too much ;) |
21:40:21 | shashlick | for anyone interested in nimgen development - https://gitter.im/nimgen/Lobby |
21:41:09 | Araq | skrylar: sounds like you reinvented "abstract interpretation" |
21:44:14 | skrylar | well now i'm reinventing bytecode ;_; |
21:44:50 | skrylar | someone had the bright idea to use json to store bytecode (it wasn't me) and it requires a pecuiliar way of stepping through it @_o |
21:44:53 | FromGitter | <kayabaNerve> skrylar Why? |
21:45:07 | FromGitter | <kayabaNerve> BTW thoughts on Funge98? |
21:45:15 | FromGitter | <kayabaNerve> And got it |
21:45:21 | FromGitter | <kayabaNerve> Sounds horrible |
21:45:50 | FromGitter | <kayabaNerve> Wait is Funge98 bytecode since 1 character is 1 ASCII byte? 0_0 |
21:45:58 | skrylar | https://github.com/inkle/ink/blob/master/Documentation/ink_JSON_runtime_format.md |
21:46:05 | FromGitter | <kayabaNerve> *1 ASCII character = 1 byte |
21:46:45 | skrylar | eeh the only esoteric language i would bother with are maybe L-systems |
21:47:34 | skrylar | otherwise pretty much just going to stick with nim (and bolt on rebol for scripting) unless nim starts doing too much stupid :E |
21:50:20 | FromGitter | <kayabaNerve> I script in NodeJS |
21:50:47 | skrylar | node is okay |
21:51:12 | FromGitter | <kayabaNerve> I work with a lot of web services |
21:51:18 | skrylar | mruby is kind of neat, but it had some strange issues when i tried it before |
21:51:48 | FromGitter | <kayabaNerve> Servers, bots, APIs, JSON data... |
21:52:06 | FromGitter | <kayabaNerve> All the stuff NodeJS is perfect for |
21:52:11 | FromGitter | <kayabaNerve> And then Nim <3 |
21:52:38 | skrylar | go has a rewrite of lua that is kind of neat. it uses native go objects so it plays well with the GC |
21:52:42 | FromGitter | <kayabaNerve> And then Funge98 is a fascination of mine 0_0 |
21:53:36 | skrylar | have a current fascination with generated content |
21:53:55 | FromGitter | <kayabaNerve> Latex is cool |
21:54:18 | skrylar | someone extended the realm of the mad god guy's island generator to do entire planets; nd just watched the GDC talk today about Overgrowth's animations |
21:54:37 | skrylar | there's like 16 hand-made frames and the rest is all interpolation |
21:55:01 | Araq | fun fact: seqs in the compiler take 2 "compilerProcs", strings take 15 |
21:57:03 | Araq | oh I miscounted seqs |
21:58:54 | Araq | but still ... 15 for strings. that means you need to implement at least 15 magic procs to replace the existing string implementation |
21:59:11 | Araq | pretty bad how this code has grown. |
21:59:57 | FromGitter | <kayabaNerve> Araq: type string = string |
22:00:01 | FromGitter | <kayabaNerve> Did I just solve it? |
22:00:04 | FromGitter | <kayabaNerve> 0 procs |
22:00:12 | FromGitter | <kayabaNerve> Perfect compatibility |
22:00:31 | skrylar | does a string really need magic procs |
22:00:34 | Araq | nice. but nothing compared to my NP = P solution. |
22:00:46 | Araq | let N = 1. --> NP = P. |
22:00:58 | FromGitter | <kayabaNerve> I'll write the Latex |
22:01:01 | skrylar | i mean they're just buffers (elixir even maps them to binary buffers; although erlang is a bit extremely silly with strings) |
22:02:03 | * | bozaloshtsh quit (Quit: ZNC 1.7.0 - https://znc.in) |
22:02:11 | Araq | skrylar: yes. so that strings continue to work at compile time. and we continue to know that s[i] requires i < s.len |
22:02:12 | * | bozaloshtsh joined #nim |
22:02:12 | * | bozaloshtsh quit (Changing host) |
22:02:12 | * | bozaloshtsh joined #nim |
22:03:10 | FromGitter | <Quelklef> What's the AST for an inline proc? I can't find it in the macros.nim documentation |
22:03:55 | Araq | the same as for any other proc, but its pragmas section contains an 'inline' identifier |
22:04:18 | FromGitter | <Quelklef> Sorry, I mean like a proc expression: `let x = proc(y: int): int = body` |
22:05:40 | Araq | ask dumpTree |
22:06:24 | dom96 | Ugh, there seems to be something really wrong with the tester |
22:06:31 | FromGitter | <Quelklef> Oh, fancy. It's `nnkLambda`, ty |
22:06:33 | dom96 | This many unrelated failures is really bad |
22:06:48 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
22:09:06 | Araq | the last time it wasn't unrelated |
22:09:20 | Araq | you merged a system.nim change without waiting for the tests |
22:10:24 | * | fjvallarino quit (Remote host closed the connection) |
22:10:45 | dom96 | Yes, I did. Because I figured a deprecation pragma wouldn't cause a failure. |
22:10:51 | dom96 | But that really isn't related to what I said |
22:10:52 | * | fjvallarino joined #nim |
22:11:18 | dom96 | I've seen at least 3 merges by you with a "Test failures unrelated" comment |
22:11:21 | * | fjvallarino quit (Remote host closed the connection) |
22:11:29 | * | fjvallarino joined #nim |
22:15:17 | Araq | all related to this regression |
22:15:57 | FromGitter | <xDotDash> Are enums with parameterized types useful? I see it atleast doesn't throw any errors |
22:16:41 | FromGitter | <xDotDash> s/useful/usable |
22:17:59 | CodeVance | Quelklef `newProc("procName".ident,procType = nnkLambda)` |
22:18:00 | CodeVance | @Quelklef |
22:19:19 | * | Vladar quit (Quit: Leaving) |
22:19:40 | Araq | xDotDash er ... what? |
22:26:51 | FromGitter | <xDotDash> Araq: this compiles `type Tester*[T] = enum first, second`without errors |
22:26:58 | dom96 | Araq: Hrm? I thought this was fixed? The method failures? |
22:28:36 | FromGitter | <xDotDash> Though it looks like you can't reference the values then |
22:28:56 | Araq | dom96: they are fixed |
22:29:05 | Araq | but not all PRs have been rebased |
22:29:41 | dom96 | okay, makes sense |
22:40:31 | stefanos82 | dom96, question: do we need -- for flags inside a .cfg file or not? |
22:40:53 | stefanos82 | either single or double hyphens that is |
22:41:08 | Araq | double hyphen is optional |
22:41:20 | stefanos82 | but single is mandatory? |
22:42:58 | Araq | probably not |
22:43:18 | stefanos82 | phew...for a moment I was worried |
22:43:47 | stefanos82 | because all my Nim project contain a nim.cfg with o:"bin/my-executable-name" |
22:51:02 | FromGitter | <metasyn> @dom96 i figured out what i was doing wrong earlier btw, nothing wrong with nim, i just was missing a write to the external process so it didn't know to write yet, which is why it was hanging on trying to read (from nothing) |
22:51:46 | * | shashlick quit (Remote host closed the connection) |
22:54:38 | * | shashlick joined #nim |
22:59:05 | * | fjvallarino quit () |
23:03:18 | FromGitter | <Quelklef> @CodeVance Ooh, thanks |
23:28:21 | * | find0x90 joined #nim |
23:47:24 | * | krux02 joined #nim |