00:05:20 | * | boydgreenfield quit (Quit: boydgreenfield) |
00:10:07 | * | boydgreenfield joined #nimrod |
00:16:51 | * | Skrylar joined #nimrod |
00:19:08 | * | renesac quit (Ping timeout: 252 seconds) |
00:36:42 | * | xenagi joined #nimrod |
00:47:21 | * | zahary1 quit (Quit: Leaving.) |
01:08:24 | * | renesac joined #nimrod |
01:11:17 | * | askatasuna quit (Quit: WeeChat 0.4.3) |
01:18:19 | * | brson quit (Quit: Lost terminal) |
01:18:39 | * | brson joined #nimrod |
01:39:14 | reactormonk | atom api wrapper anyone? ^^ |
01:45:12 | * | Jesin joined #nimrod |
01:58:22 | * | nande joined #nimrod |
01:58:53 | * | brson quit (Ping timeout: 255 seconds) |
02:01:02 | * | DAddYE joined #nimrod |
02:15:41 | * | boydgreenfield quit (Quit: boydgreenfield) |
02:17:36 | * | renesac quit (Ping timeout: 258 seconds) |
02:30:18 | * | renesac joined #nimrod |
02:33:07 | * | boydgreenfield joined #nimrod |
02:42:35 | * | bjz joined #nimrod |
02:44:05 | * | boydgreenfield quit (Quit: boydgreenfield) |
03:14:43 | NimBot | Araq/Nimrod devel ae6dac6 Charlie [+0 ±1 -0]: added .ilk files to the koch clean list, these are incremental link information files for MSVC |
03:14:43 | NimBot | Araq/Nimrod devel 71ca28f Simon Hafner [+0 ±1 -0]: Merge pull request #1185 from barcharcraz/kochilk... 2 more lines |
03:48:49 | * | xenagi quit (Quit: Leaving) |
04:23:15 | * | Raynes quit (Ping timeout: 252 seconds) |
04:27:44 | * | Raynes joined #nimrod |
04:28:00 | * | Raynes quit (Changing host) |
04:28:00 | * | Raynes joined #nimrod |
04:56:13 | * | Demos_ joined #nimrod |
04:57:08 | Demos_ | I may have asked this before but is there a standard library function that returns the first item from an iterator, then stops iterating. I suspect this would have to be a template |
04:57:14 | * | nande quit (Ping timeout: 240 seconds) |
04:58:13 | * | nande joined #nimrod |
05:01:04 | * | boydgreenfield joined #nimrod |
05:05:34 | fowl | Demos, not that i know of |
05:05:50 | fowl | seems pretty specific |
05:07:06 | Demos_ | well general iterator tools would be nice, I can write some I suppose |
05:07:30 | Demos_ | is there a way to pass an inline iterator to a proc if that proc is marked {.inline.}? |
05:07:39 | Demos_ | or with some other special annotation? |
05:13:46 | * | Demos_ quit (Read error: Connection reset by peer) |
05:15:16 | * | BitPuffin joined #nimrod |
05:31:26 | * | uggedal joined #nimrod |
05:46:09 | boydgreenfield | Anyone have experience with odd linker errors and external C files (specifically on OSX)? I have a very simple C function that compiles fine with gcc/clang, but I get architecture errors when using the .compile or .link pragmas. Example: https://gist.github.com/boydgreenfield/7fbd6d84747711420977 |
05:49:31 | * | Demos quit (Read error: Connection reset by peer) |
05:54:06 | * | BitPuffin quit (Read error: Connection reset by peer) |
05:54:29 | * | BitPuffin joined #nimrod |
05:57:07 | boydgreenfield | (And before anyone asks – haven’t tried it on Linux yet and can’t on the current machine. Will do so tomorrow.) |
06:04:33 | Skrylar | boydgreenfield: sounds like an error in object types |
06:04:42 | Skrylar | probably trying to link a powerpc binary to an intel one, or 32-bit to 64-bit |
06:09:02 | Skrylar | that happens a lot in OSX |
06:09:29 | Skrylar | not sure if nimrod uses all the dozen flags to have apple's gcc output fat binaries, though you can force it to |
06:09:49 | njoejoe | I get similar error message on linux (with __builtin_popcount11() and code): nimcache/popcount.o: file not recognized: File format not recognized |
06:10:20 | njoejoe | i wonder if nimrod needs a special flag for compiling it |
06:32:52 | Skrylar | njoejoe: that means you are on a dual-architecture system |
06:33:06 | Skrylar | try adding --passl:-m32 |
06:33:14 | Skrylar | (or m64 if thats your target) |
06:33:47 | Skrylar | multiarch systems are annoying because if you aren't careful it will go "oh you have libpng" and try to link a 64-bit png with a 32-bit executable which gives the exact error you just mentioned |
06:34:04 | Skrylar | there are some flags you can pass along to GCC to help |
06:34:49 | * | chemist69 joined #nimrod |
06:41:12 | njoejoe | --passl:-m32 (and m64) same error. i wonder if it's because it's a popcount.h file instead of popcount.c file? the nimcache/popcount.o is pretty huge 1.6megs... i would think it should be tiny. |
06:48:16 | Skrylar | why are you compiling a header? |
06:54:45 | njoejoe | i was just trying to let boydgreenfield know that i get the same error on linux. his code is at https://gist.github.com/boydgreenfield/7fbd6d84747711420977 the .h file contains 1 function. i renamed it to a .c file and changed counts1.nim to reference it as .c, and get a different error now: undefined reference to `count_1bits' |
06:56:15 | njoejoe | at least nimcache/popcount.o is reasonable sized now... 940 bytes. |
07:22:24 | Skrylar | BitPuffin: well as tedious as it is, in a day or two we'll have our own freeimage in nimrod |
07:26:16 | BitPuffin | Skrylar: wat :D |
07:27:57 | Skrylar | BitPuffin: i've been binding image libs the past few days, later i have to write the loaders using them |
07:28:47 | Skrylar | buut the net result is -> nimrod native image loading |
07:28:54 | Skrylar | at least half of its native anyway |
07:42:04 | BitPuffin | sweet :D |
07:46:56 | * | BitPuffin quit (Ping timeout: 255 seconds) |
07:57:34 | * | Varriount|Mobile joined #nimrod |
08:06:10 | Varriount|Mobile | Doing research on the proactor pattern and asynchronous io is quite interesting. |
08:06:22 | Skrylar | coffee time \o |
08:10:47 | * | DAddYE quit (Remote host closed the connection) |
08:23:30 | Skrylar | Varriount|Mobile: yeah, IO is.. a thing |
08:23:46 | Skrylar | i've been too busy with image-to-textures to do much research lately |
08:27:03 | * | nande quit (Read error: Connection reset by peer) |
08:46:46 | * | BitPuffin joined #nimrod |
08:59:41 | * | kunev joined #nimrod |
09:02:56 | * | kunev quit (Client Quit) |
09:03:04 | * | kunev joined #nimrod |
09:03:13 | * | kunev quit (Client Quit) |
09:03:31 | * | kunev joined #nimrod |
09:12:38 | * | untitaker quit (Ping timeout: 240 seconds) |
09:13:14 | * | untitaker joined #nimrod |
09:21:52 | * | DAddYE joined #nimrod |
09:25:37 | Skrylar | not bad.. |
09:25:47 | Skrylar | compressed a 128^2 pog with alpha channel to 5kb |
09:25:54 | * | DAddYE quit (Ping timeout: 240 seconds) |
09:34:36 | Araq | hi uggedal welcome |
09:44:45 | * | BitPuffin quit (Ping timeout: 240 seconds) |
10:04:07 | * | ehaliewicz quit (Ping timeout: 258 seconds) |
10:05:32 | * | BitPuffin joined #nimrod |
10:16:58 | Skrylar | pff |
10:17:03 | Skrylar | this group made an xbox game in 7 weeks |
10:17:14 | Skrylar | i feel dumb since it took me a week to load images |
10:17:20 | EXetoC | pong? |
10:17:35 | Skrylar | no, some motorcycle game on the first gen xbox |
10:18:01 | EXetoC | I'm sure they had some high level tools to work with |
10:19:06 | Skrylar | still |
10:19:12 | Skrylar | one week for loading textures is kind of crap |
10:19:30 | EXetoC | you're re-inventing the wheel aren't you? |
10:20:46 | Skrylar | somewhat |
10:21:19 | Skrylar | then again aren't most nimrod users :P |
10:21:48 | * | Jehan_ joined #nimrod |
10:22:58 | EXetoC | some are, but many rely on C libs |
10:23:43 | Jehan_ | Every programmer reinvents the wheel from time to time. :) |
10:23:53 | EXetoC | won't be long before c2nim or clang2nim will be able to take over the world though |
10:23:59 | Jehan_ | Sometimes reuse just isn't cost-effective. |
10:27:32 | Skrylar | this is mostly just slow because i'm dumb |
10:27:48 | Skrylar | i'm sure there's a grognard who can do 4 image codec loading in a weekend |
10:29:02 | * | BitPuffin quit (Ping timeout: 258 seconds) |
10:32:35 | Skrylar | i organized this in a silly way where you can just not import the jpeg module and it won't bother supporting it |
10:33:06 | Skrylar | instead of forcing you to have gif/webp around if you don't want it |
10:34:46 | EXetoC | you can just exclude those from some set though |
10:36:09 | EXetoC | AllFormats - ifWebp? |
10:38:41 | Skrylar | at the moment theres just an array of codecs and if you want one you tell it to activate it somewhere in setup |
10:39:02 | Skrylar | its not that unusual compared to SDL and WX where you have to tell them to do something similar |
10:39:18 | * | BitPuffin joined #nimrod |
10:39:32 | Skrylar | aaand i just coffee'd my shirt |
10:39:36 | Skrylar | thats a sadface moment |
10:39:42 | EXetoC | why did you do that? |
10:39:48 | Skrylar | accident |
10:39:57 | EXetoC | that makes sense |
10:40:11 | Skrylar | 5:40am coffee XD |
10:40:54 | Skrylar | people will prolly want me to extricate this image loader out of skylight and shove it on babel |
10:42:54 | Skrylar | EXetoC: i'm thinking the higher level gl stuff will be like libGDX |
10:43:12 | Skrylar | libGDX does it by just providing some utility classes you can use intermixed with normal GL calls |
10:44:35 | Skrylar | that said it would be nice to have a micro-nimrod for GLSL xD |
10:44:54 | EXetoC | well, we do have nim-freeimage, but it's just a wrapper. it allows for some manipulations though |
10:45:17 | Skrylar | doesn't freeimage have crazy licensing though |
10:45:19 | EXetoC | I don't know what you have in mind. in many cases you just want to get a handle |
10:45:33 | Skrylar | EXetoC: no, post-init stuff |
10:45:59 | Skrylar | in libgdx they have things like sprite batch objects so you can set up shaders and then let gdx handle sprite batching |
10:47:16 | Skrylar | or being able to just say "this is my model, please figure out how to render it" since theres a different method for GL3 and GL2 |
10:47:36 | * | Jehan_ quit (Quit: Leaving) |
10:47:43 | Skrylar | and of course the derpy people who prefer immediate mode :> |
10:48:24 | EXetoC | and retro GL |
10:48:41 | Skrylar | at least we have the advantage of being able to have AST-macros so you can write the model in newb-friendly immediate mode and the background turns it in to a precomputed model |
10:49:34 | Skrylar | i'm NOT looking forward to learning lighting >_< |
10:50:53 | BitPuffin | why not |
10:50:55 | BitPuffin | it's fun |
10:51:00 | Skrylar | i hate math |
10:52:23 | BitPuffin | why |
10:52:25 | BitPuffin | it's fun |
10:52:27 | BitPuffin | xD |
10:52:37 | dom96 | it seems Mr. Pike dislikes significant whitespace. |
10:52:40 | Skrylar | mostly 'cause its so arbitrary |
10:52:50 | Skrylar | "x = y on a tuesday!" |
10:52:52 | * | dom96 watched the GopherCon opening keynote |
10:52:59 | EXetoC | ? |
10:53:18 | EXetoC | you've picked the wrong field then :p maybe you mean complex math |
10:53:34 | Skrylar | no i have a book on algebra-to-trig |
10:53:36 | dom96 | many programmers dislike math |
10:53:41 | BitPuffin | dom96: you wasted your life in other words? |
10:53:48 | dom96 | BitPuffin: yep :( |
10:53:50 | BitPuffin | Skrylar: pick one up |
10:54:01 | dom96 | BitPuffin: I got an exam on Friday, help me :( |
10:54:06 | Skrylar | i don't memorize unassociated facts very well so there's a lot of math that is hard to remember for me |
10:54:21 | Skrylar | half the time i remember the algorithms by a visual representation of moving the parts around |
10:54:48 | Skrylar | awesome for taking apart ideas tosee how theytick, horrible for languages |
10:54:49 | EXetoC | that's a good way to memorize. just do something practical with it |
10:55:04 | Skrylar | also anki decided to corrupt again |
10:55:14 | Skrylar | i swear that program has the shittiest use of sqlite ever |
10:55:18 | EXetoC | plotting various parts of an equation for example is pretty useful |
10:55:23 | Skrylar | it takes EFFORT to corrupt a sqlite database |
10:55:46 | Skrylar | turning the power off mid-transaction is actually part of the standard testing harness for it |
10:59:22 | Skrylar | EXetoC: i've been using anki with miktex so i have flashcards with proper formatting; and the pdf i have on hand is one of the few that bother to show you how each individual part works and then moves on intead of spending 50 pages dawdling |
10:59:42 | Skrylar | more effective than 8 years of schooling lol |
11:02:45 | Varriount|Mobile | Skrylar: There are settings you can change in Sqlite which increase corruptibility |
11:03:25 | Skrylar | Varriount|Mobile: i donno what they're doing in Anki; but if you make a copy of the database while open the whole collection is corrupted |
11:03:37 | Skrylar | luckily the program makes copies of the sqlite file every time it saves |
11:03:54 | Skrylar | which is ridiculous that it has to do it that often, but yay |
11:13:33 | * | BitPuffin quit (Ping timeout: 240 seconds) |
11:14:17 | * | oddmunds joined #nimrod |
11:40:15 | Skrylar | i think for now i'm just going to leave out indexed images |
11:40:42 | Araq | hi oddmunds welcome |
11:40:47 | Skrylar | i'd have to add in an extra parameter/conversion step to get the indexes out, and its just not a high priority at the moment since almost nobody uses them anymore in GL |
11:41:26 | oddmunds | Araq: thanks, i just heard mention of Nimrod the other day (over at #ruby-lang or #pry, i believe) and decided to check out the IRC channel |
12:51:36 | * | darkf quit (Quit: Leaving) |
13:00:06 | * | BitPuffin joined #nimrod |
13:01:20 | BitPuffin | dom96: what's the exam aböut |
13:21:26 | Araq | Skrylar: I still want that "disphelper" wrapper (COM support). Any chance you'll wrap *that* ? :-) |
13:36:52 | Skrylar | com crap? |
13:36:52 | Skrylar | lol |
13:40:23 | Skrylar | damn it gcc |
13:40:35 | Skrylar | i hate when you tell it to link a lib and it goes herp derp i can't find things in local |
13:40:48 | Skrylar | then you tell it where to find local with -L, and it goes herp derp |
13:45:28 | EXetoC | /usr/local/lib? |
13:46:34 | Skrylar | it was just gcc being dumb, i had to give it the full windows path even though its running in mingw |
13:46:36 | Skrylar | *msys |
13:47:37 | EXetoC | right, -L |
13:47:42 | EXetoC | care to add some long options too? -.- |
13:52:27 | Skrylar | long options? |
13:52:38 | Skrylar | it worked when i did --passl:"-LC:\blah\crap" |
13:53:13 | Skrylar | I need a nap, then i'll work on finishing this jpeg loader |
13:58:32 | EXetoC | no, GCC should |
15:07:24 | * | bjz quit (Read error: Connection reset by peer) |
15:07:50 | * | bjz joined #nimrod |
15:11:59 | * | kunev quit (Quit: leaving) |
15:12:21 | * | bjz quit (Ping timeout: 240 seconds) |
15:54:29 | * | BitPuffin quit (Ping timeout: 258 seconds) |
15:56:59 | * | Demos joined #nimrod |
16:02:38 | * | untitaker quit (Ping timeout: 255 seconds) |
16:09:02 | * | untitaker joined #nimrod |
16:10:48 | * | boydgreenfield quit (Quit: boydgreenfield) |
16:11:01 | * | Jehan_ joined #nimrod |
16:20:22 | * | chemist69 quit (Quit: leaving) |
16:21:30 | * | zahary joined #nimrod |
16:27:16 | * | boydgreenfield joined #nimrod |
16:27:41 | * | boydgreenfield quit (Read error: Connection reset by peer) |
16:28:26 | * | boydgreenfield joined #nimrod |
16:29:11 | * | boydgreenfield quit (Read error: Connection reset by peer) |
16:29:58 | * | boydgreenfield joined #nimrod |
16:40:11 | * | boydgreenfield quit (Read error: Connection reset by peer) |
16:49:56 | * | boydgreenfield joined #nimrod |
16:52:41 | * | q66 joined #nimrod |
16:52:41 | * | q66 quit (Changing host) |
16:52:41 | * | q66 joined #nimrod |
16:53:48 | * | boydgreenfield quit (Read error: Connection reset by peer) |
16:54:37 | * | boydgreenfield joined #nimrod |
16:59:22 | * | boydgreenfield quit (Read error: Connection reset by peer) |
16:59:55 | * | boydgreenfield joined #nimrod |
17:00:48 | * | boydgreenfield quit (Read error: Connection reset by peer) |
17:12:33 | * | boydgreenfield joined #nimrod |
17:14:41 | * | Johz joined #nimrod |
17:14:59 | * | boydgreenfield quit (Read error: Connection reset by peer) |
17:26:54 | * | DAddYE joined #nimrod |
17:51:35 | * | boydgreenfield joined #nimrod |
17:52:03 | boydgreenfield | And another question: I’m getting Error: number 9223372036854775809 out of valid range for a UInt64 (this is 2**63 - 1 + 2). I previously had this problem on 0.9.2 and it was fixed in the git version since then, but has perhaps regressed. Can anybody on another system verify if it is/isn’t happening for them? Prior GH issue: https://github.com/Araq/Nimrod/issues/723. (And yes I got disconnected again since I |
17:52:09 | boydgreenfield | asked the .compile. .link. question) |
17:54:08 | * | boydgreenfield quit (Read error: Connection reset by peer) |
17:54:53 | Varriount|Mobile | boydgreenfield: I don't recall that bug being fixed. If I recall correctly, range checking certain large numbers requires working int128 data types for the compiler, which it currently doesn't have. |
18:02:13 | * | Varriount|Mobile quit (Remote host closed the connection) |
18:02:30 | * | Varriount|Mobile joined #nimrod |
18:15:52 | * | brson joined #nimrod |
18:25:51 | * | uvelichitel joined #nimrod |
18:31:17 | * | boydgreenfield joined #nimrod |
18:57:23 | * | Varriount|Mobile quit (Read error: Connection reset by peer) |
18:58:39 | njoejoe | boydgreenfield: did you ever figure out your compile error for popcount()? i'm curious what the solution is. |
18:59:40 | boydgreenfield | njoejoe: No, not yet. I ported the popcount code to Nimrod for the moment, though that sketches me out as i have no notion of how to *prove* it’s working 100% properly (though the C implementation had that problem as well). |
19:00:15 | njoejoe | gotcha |
19:00:31 | fowl | boydgreenfield, did you run it through c2nim to translate |
19:00:55 | boydgreenfield | fowl: No – that didn’t even occur to me. It’s only like 10 lines. |
19:01:02 | fowl | oh |
19:08:06 | * | brechtm joined #nimrod |
19:08:10 | brechtm | hi |
19:08:45 | brechtm | is endb (git devel) supposed to be functional? |
19:11:59 | EXetoC | it's broken |
19:12:17 | * | chemist69 joined #nimrod |
19:13:09 | EXetoC | one issue regarding invalid C code was reported 12 days ago |
19:14:00 | * | nande joined #nimrod |
19:23:49 | * | brechtm quit (Ping timeout: 250 seconds) |
19:26:59 | * | brechtm joined #nimrod |
19:27:17 | brechtm | EXetoC: thanks, that's likely the same thing I'm seeing |
19:31:52 | * | Matthias247 joined #nimrod |
19:33:21 | Jehan_ | There's a countBits32 procedure in the math module if you need that. |
19:37:44 | boydgreenfield | Is it possible to export a proc from a private/submodule and then have it be accessible in the `mainmodule` namespace? I can’t seem to find any examples of this, nor get the * syntax to enable it, but it would be useful when compiling misc. functions that all carry around their own licenses (vs. having one monolithic `miscellanous_module` file). |
19:37:55 | boydgreenfield | Scratch that. |
19:38:00 | boydgreenfield | Got it to work. My bad. |
19:49:36 | boydgreenfield | Well – I sort of got it to work. So if I have a module `misc` that does import submodule/hello export hello.hello with `hello` being a `proc` exported from submodule/hello, and then I `import misc` I can call hello just fine. But I get an undeclared identifier error. Is there a proper way to handle this? |
19:52:12 | EXetoC | how can you call it if you get an error? |
19:52:42 | boydgreenfield | EXetoC: I don’t get an error if I import it elsewhere using `import misc`. But I *do* get an error if I try `from misc import hello`. |
19:52:56 | boydgreenfield | EXetoC: Which I find odd. |
19:54:51 | EXetoC | I don't know if it is a bug |
19:55:06 | EXetoC | I assume it is |
19:55:31 | boydgreenfield | EXetoC: Yes, I can’t tell if it’s a bug or just under-documented re: export. To be clear, the error is in the `from misc import hello` line |
19:56:09 | fowl | the solution of course |
19:56:19 | fowl | is to stop using export as a way around the module system |
19:57:04 | fowl | boydgreenfield, hello isnt in misc, no matter that you imported and exported it from there |
19:57:32 | EXetoC | but there's no distinction if you reference it in other statements |
19:57:48 | boydgreenfield | fowl: Well, I’m open to structuring it however. But, in this case I want to compile a miscellaneous set of functions, sometimes borrowing public domain and MIT/Apache code from a variety of places and imho it’s substantially better from an organization/clarity perspective to keep these things separate as private/ submodules. What’s the nimrod best practice here? |
19:57:50 | EXetoC | either way, I've never needed that, and I export things sparingly |
20:00:41 | fowl | boydgreenfield, if you want "hello" to belong to misc you can include it instead of import |
20:01:33 | boydgreenfield | fowl: Ah, well that does seem better yes. |
20:16:11 | * | Jesin quit (Remote host closed the connection) |
20:18:37 | * | chemist69 quit (Quit: leaving) |
20:19:09 | * | brechtm quit (Ping timeout: 240 seconds) |
20:29:31 | * | brechtm joined #nimrod |
20:38:57 | * | vendethiel quit (Ping timeout: 252 seconds) |
20:39:14 | * | vendethiel joined #nimrod |
21:05:08 | * | OrionPK quit (Remote host closed the connection) |
21:06:45 | * | Mat3 joined #nimrod |
21:06:53 | Mat3 | good afternoon |
21:09:51 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:11:40 | dom96 | hey Mat3 |
21:12:17 | Mat3 | hi dom96 |
21:12:48 | brechtm | what's the Nimrod equivalent of Python's "pass" ? |
21:13:04 | Jehan_ | discard |
21:13:08 | Jehan_ | Without an argument. |
21:13:13 | brechtm | thx |
21:29:41 | * | OrionPK joined #nimrod |
21:35:33 | * | uvelichitel quit (Ping timeout: 240 seconds) |
21:35:55 | * | brechtm quit (Quit: leaving) |
21:36:18 | njoejoe | how to write binary data into string? var s = "$1$2str" % [x,y] where x and y are 32bit uints, i want the raw 4 bytes for each into the "s" variable. |
21:40:41 | Jehan_ | var s = "" |
21:40:41 | Jehan_ | var i: int32 = 0x21212121 |
21:40:41 | Jehan_ | s.setLen(sizeof(i)) |
21:40:41 | Jehan_ | copyMem(addr(s[0]), addr(i), sizeof(i)) |
21:40:41 | Jehan_ | echo(s) |
21:42:56 | EXetoC | or "var s = newString i.sizeof" |
21:54:14 | * | Jesin joined #nimrod |
21:56:49 | njoejoe | thanks, that did it, and for second number i do: copyMem(addr(s[4]),addr(y),4). man, there's got to be a better way... one of these days i'll look into that string interpolation macro. |
21:57:32 | Jehan_ | The better way is to wrap it in an abstraction. :) |
21:58:11 | Jehan_ | I don't think it calls for string interpolation, though. |
21:58:46 | Jehan_ | Just do a bytes(x: int32): string = ... |
21:59:10 | Jehan_ | Or addBytes(var s: string, x: int32) |
22:01:00 | EXetoC | I wanted to add something like that. there should be an overload that takes a position two, and then validate |
22:02:29 | Jehan_ | proc addBytes(s: var string, x: int32) = |
22:02:29 | Jehan_ | var t = x |
22:02:29 | Jehan_ | let n = len(s) |
22:02:29 | Jehan_ | s.setLen(n + sizeof(t)) |
22:02:29 | Jehan_ | copyMem(addr(s[n]), addr(t), sizeof(t)) |
22:02:43 | EXetoC | and then maybe some object flattening+serialization with the help of TAny |
22:03:38 | Jehan_ | Well, you can always adapt marshal.nim :) |
22:04:17 | EXetoC | that has been suggested |
22:04:29 | Jehan_ | But I don't think something like Perl's pack is the way to go. |
22:05:03 | Jehan_ | You'd be embedding a non-typesafe sublanguage in the language you already have. |
22:05:18 | EXetoC | I haven't used that |
22:05:25 | Jehan_ | This is different from string interpolation to write console output, because you generally want binary formats to be correct. |
22:05:39 | Mat3 | ciao |
22:05:39 | Jehan_ | There's value to having typechecking for that. |
22:05:43 | * | Mat3 quit (Quit: Verlassend) |
22:05:44 | njoejoe | pack was what i was thinking like var s = "#{[x,y].pack('LL')}#{key}#{val}" |
22:06:51 | EXetoC | various formatting utilities can be made type safe in nimrod |
22:07:05 | Jehan_ | EXetoC: Yeah, but then you have a new DSL to learn. |
22:07:29 | njoejoe | i must admit i think i'm overly biased to liking interpolation.. i like seeing things layed out right in front of me |
22:07:53 | Jehan_ | "So, what does x[8] mean again in the pack string?" |
22:08:38 | Jehan_ | It may make it easier to write stuff. Understanding it six months later again can be a different story. |
22:09:23 | Jehan_ | A proc call is something that you can look up (whether using ctags or an IDE). |
22:10:28 | njoejoe | true true. and maybe no "pack" is good. but still i think interpolation is great. |
22:10:56 | njoejoe | as opposed to % [var, var2] |
22:10:58 | Jehan_ | String interpolation is generally simple and reduces line noise in the code. |
22:11:16 | Jehan_ | So that's a different story. |
22:12:38 | EXetoC | isn't that one form of string interpolation? |
22:13:00 | Jehan_ | The string interpolation that I think of doesn't require a complex formatting DSL. |
22:13:36 | Jehan_ | E.g. "The #{subject} #{verb}ed the #{object}." |
22:17:56 | njoejoe | yeah Jehan_ that's what i'm used to. "Subject #{i} is: #{subjects[i]}" |
22:18:41 | Jehan_ | Yup, and it's generally more readable than patching strings together to generate human-readable output. |
22:18:47 | Jehan_ | So, totally different story. |
22:29:12 | fowl | someone wrote a thing that does interpolation at compile time |
22:29:50 | fowl | so "hello ${name}!" becomes result = "hello "; result.add($ name); result.add "!" |
22:30:11 | Jehan_ | It's not terribly difficult in principle, the challenge is not to break the VM in the process. :) |
22:30:26 | Jehan_ | parseExpr should be able to do the heavy lifting. |
22:30:55 | fowl | the vm shouldnt have trouble with it |
22:31:02 | * | Varriount|Mobile joined #nimrod |
22:31:14 | Varriount|Mobile | dom96: https://medium.com/devops-programming/f712fa26f5bc |
22:31:17 | Jehan_ | It's more that the VM still has the occasional bug. |
22:31:24 | Jehan_ | At least I seem to keep running into them. |
22:41:15 | dom96 | Varriount|Mobile: Interesting. Package management is unfortunately very complex, it seems that in some ways I am lucky as it seems harder to create package managers for interpreted languages/ |
22:42:19 | dom96 | It looks to me like some of the issues described there don't apply to babel simply because it can compile non-library packages. |
22:43:34 | dom96 | I don't think we will know how well babel works until we have a large number of packages with a large number of people using it. |
22:43:36 | Jehan_ | I think a big problem with package managers (not just for languages) is the often really hideous dependency graphs. |
22:43:51 | Varriount|Mobile | Oddly enough, I got that link through a posting on the python-ideas mailing list. |
22:44:19 | Jehan_ | Install foo, pull in gmp, cairo, imagemagick, and an obscure package that is hardly maintained anymore and now breaks. |
22:45:46 | Varriount|Mobile | Hm. But how would a package system prevent that? |
22:46:05 | Jehan_ | No. Package systems generally incentivize dependency bloat. |
22:46:30 | Jehan_ | In related news: Why I don't use Linux if I can avoid it. |
22:47:09 | Varriount|Mobile | Jehan_: What do you use then? |
22:47:11 | njoejoe | does golang have good package management? I like their "import github.com/user/module" thingy |
22:47:22 | dom96 | njoejoe: Go doesn't really have package management. |
22:47:23 | Jehan_ | I like the idea behind Linux, but apt-get and rpm are DLL hell on steroids. |
22:48:01 | Jehan_ | Varriount|Mobile: I'm using a Mac. Not because I'm a fanboy, but because it's overall the most hassle-free environment. |
22:48:22 | dom96 | njoejoe: All it has is the ability to download packages from arbitrary URLs i.e. you cannot specify the version |
22:48:22 | Jehan_ | I'm just too old to play sysadmin all day. |
22:48:28 | Jehan_ | In the end, I just want to get stuff done. |
22:49:01 | Varriount|Mobile | Jehan_: I'd like to try using OSX, however I lack the money/motivation to switch away from Windows. |
22:49:08 | njoejoe | dom96: gotcha. not being able to specify a version is pretty crappy |
22:49:44 | EXetoC | well I don't get anything done when I'm windows trying to install things |
22:49:45 | Jehan_ | dom96: About compiled vs. interpreted languages for package managers: Pip has nothing on Maven in the complexity department. :) |
22:50:17 | Jehan_ | Varriount|Mobile: I don't see a problem with that. I'm not a platform evangelist. I'm fine with anything that allows me to be productive. |
22:50:36 | njoejoe | Varriount: you may not even like OSX. I could never warm up to its UI. i'm pretty happy with linux. |
22:50:49 | Jehan_ | Unfortunately, I need something Unixish, so OS X it is. |
22:51:31 | dom96 | Jehan_: Can't say I'm surprised, its primary use is Java after all. |
22:51:37 | Jehan_ | But I'd never recommend it to someone who, say, is primarily working with .NET. |
22:51:49 | Varriount|Mobile | At the moment, one of my greatest annoyances with Windows is that the File Explorer doesn't automatically expand the filename column size to fit longer filenames. |
22:52:46 | dom96 | Dependency resolution certainly took me the longest to figure out when developing Babel. |
22:52:59 | Jehan_ | Varriount|Mobile: I mostly live in zsh myself. I'm totally oblivious to Finder problems (OS X equivalent of Explorer) because I barely touch it. |
22:53:28 | dom96 | I really wish I had the time to gain more experience with package managers before writing it. |
22:53:43 | Jehan_ | dom96: It's less about the package manager and more about the package design. Any package with more than 1-2 dependencies I will think very hard about using at all. |
22:53:58 | Jehan_ | May save me time now, may cost me time due to maintenance later on. |
22:54:02 | fowl | Varriount|Mobile, surely there are other file managers you can use |
22:54:21 | Jehan_ | But then, I have programming needs that are probably not so mainstream. :) |
22:54:40 | dom96 | Jehan_: I can understand that. The reason I started using Nimrod in the first place is because I wanted as little dependencies as possible. |
22:55:06 | Jehan_ | dom96: That's actually a major attraction for me, too. |
22:55:11 | dom96 | I worry that packages with long and deep dependency lists are inevitable :( |
22:55:26 | Jehan_ | I can package the entire compiler in source form with an application, for example. |
22:55:43 | dom96 | I'm not sure there is anything I can do to prevent that. |
22:55:53 | fowl | my game depends on enet, allegro, fowltek, signals, and chipmunk |
22:56:02 | fowl | thats a lot of dependencies>_> |
22:56:12 | Jehan_ | dom96: Probably only by rules so draconian that people would revolt. :) |
22:56:20 | dom96 | fowl: Does babel handle all that? |
22:56:25 | fowl | dom96, yea |
22:56:27 | njoejoe | dom96: my favorite thing about npm is the ability to surf around npmjs and find dependencies and dependents. it's a great way to explore things that are related to whatever problem you have at hand |
22:56:29 | dom96 | fowl: cool :D |
22:56:45 | fowl | dom96, well i didnt make a .babel for it since there multiple binaries you can build |
22:57:01 | fowl | dom96, i have a task to install the dependencies though |
22:57:20 | Jehan_ | One of the reasons I like Homebrew for package management on OS X is that there are generally few dependencies involved. |
22:57:21 | dom96 | Jehan_: All I can think of is including all the dependencies with my code. |
22:57:34 | Jehan_ | That's not part of the package system, though, just that most packages tend to be standalone. |
22:58:21 | Jehan_ | And it really depends on the package, too. |
22:58:23 | dom96 | fowl: aww, you should. |
22:58:45 | Jehan_ | For example, I don't worry about depending GMP. GMP is well-maintained and has enough critical mass that it's not going away. |
22:59:54 | EXetoC | I wouldn't want to use monolithic packages just to keep the dependencies down |
23:00:20 | dom96 | Oh yeah. That's a good point. The way babel currently works is pretty dangerous, all packages are either on github or bitbucket meaning they could be deleted at any time. |
23:00:32 | * | Jesin quit (Quit: Leaving) |
23:01:01 | Jehan_ | EXetoC: The problem is that when your dependency graph starts looking like a bird's nest, it generally involves quite a few packages of dubious status. |
23:01:08 | dom96 | Go may suffer from the same problems. |
23:01:20 | Jehan_ | Mashing them together in one monolithic package is not going to help. |
23:01:33 | dom96 | Perhaps we can rely on the goodness of our fellow programmers heh |
23:01:48 | EXetoC | yeah that's worse than a somewhat flat hierarchy |
23:04:02 | fowl | btw guys readers digest selected fowltek as #1 best most useful nimrod package |
23:05:47 | fowl | i lie :( |
23:05:55 | fowl | it was me who selected it |
23:06:18 | Jehan_ | Well, I'm off to bed. Night, folks! |
23:06:28 | fowl | gn |
23:06:28 | dom96 | bye Jehan_ |
23:06:31 | * | Jehan_ quit (Quit: Leaving) |
23:08:28 | * | BitPuffin joined #nimrod |
23:13:19 | Varriount | dom96: By the way, I've been reading articles on the Proactor pattern, and on IOCP-type patterns in general. |
23:14:50 | dom96 | Varriount: Cool. Found out anything interesting? |
23:15:01 | Varriount | dom96: I've been wondering if, at least on Windows, the asyncdispatch module can use the PostQueuedCompletionPacket mechanism so that the IOCP mechanism can also be used for actions that require offloading to other threads or processes. |
23:15:52 | Varriount | Maybe I've got the wrong idea, but IOCP is very much like a message channel, shared between the OS and a program's threads. |
23:16:23 | dom96 | Sure. |
23:16:49 | dom96 | How's fsmonitor going? |
23:17:14 | Varriount | dom96: Once I get the api sorted out, it should be smooth sailing. Right now I'm busy with exams. |
23:18:46 | Varriount | dom96: I also think that serious thought needs to go into how the current asyncdispatch module can be expanded to be something that can compete with something like python's new async module. |
23:19:09 | Varriount | extensability is the name of the game, I think. |
23:21:12 | * | darkf joined #nimrod |
23:35:22 | dom96 | good night |
23:35:35 | Varriount | dom96: Goodnight. |
23:43:31 | * | Varriount|Mobile quit (Remote host closed the connection) |
23:51:45 | * | xenagi joined #nimrod |