00:20:00 | * | rockcavera joined #nim |
00:31:58 | shashlick | They are nimgen global sections, hence the n. to distinguish |
00:57:23 | * | flaviu quit (Remote host closed the connection) |
01:03:36 | shashlick | Let me know if you have any feedback |
01:04:51 | FromGitter | <Varriount> shashlick: Is there a way to change the output name of a translated C file? |
01:14:04 | * | endragor joined #nim |
01:18:55 | shashlick | varriount: not as of yet, so far, nimgen converts - to _ since - is not allowed in module names |
01:19:18 | shashlick | but i need that for the 7z wrapper I was trying out since its first letter is a number which nim doesn't like again |
01:26:29 | shashlick | what's your specific use case? |
01:30:50 | FromGitter | <Varriount> shashlick: Well, I was thinking of something like "import nimreadline" and "import nimreadline_core", where the "_core" contains the actual wrapper. The other module would contain higher-level functions. |
01:31:47 | shashlick | i've been thinking about that |
01:32:39 | FromGitter | <Varriount> What I would really like to do is "import nimreadline" and "import nimreadline/core", but I suspect that the module system doesn't allow that. |
01:33:22 | shashlick | right now, all nimgen modules have an output dir so you import them as `import nimssl/sha`, I was wondering if you could have a `nimsha.nim` in the root - would nimble and nim accept that |
01:34:13 | FromGitter | <Varriount> The best way would either be to ask dom96 or araq, or test it yourself. |
01:38:47 | shashlick | varriount: nope, nimble doesn't like it, complains about package structure |
01:40:31 | shashlick | will have to have it as a sibling in the output directory, but nimgen deletes all .nim files because all are expected to be generated |
01:40:49 | FromGitter | <Varriount> shashlick: Man, c2nim has come a long way. I was actually able to translate the linenoise source file (not the header) with c2nim. |
01:41:05 | shashlick | nice |
01:41:11 | FromGitter | <Varriount> I had to make 2 edits, but that was it. |
01:56:07 | * | dddddd quit (Remote host closed the connection) |
02:02:53 | * | zszf6cefj5iz quit (Quit: WeeChat 2.1) |
03:43:25 | * | rauss joined #nim |
04:39:09 | * | sz0 quit (Quit: Connection closed for inactivity) |
04:52:31 | * | leorize quit (Quit: WeeChat 2.1) |
04:52:53 | * | leorize joined #nim |
04:53:16 | * | leorize quit (Client Quit) |
05:00:52 | * | lainon quit (Ping timeout: 260 seconds) |
05:09:07 | * | lainon joined #nim |
05:09:31 | * | lainon is now known as Guest27633 |
05:09:59 | * | shashlick quit (Ping timeout: 276 seconds) |
05:10:53 | * | Guest27633 quit (Client Quit) |
05:36:00 | * | nsf joined #nim |
05:53:31 | * | pwntus joined #nim |
05:54:06 | * | pwntus quit (Changing host) |
05:54:06 | * | pwntus joined #nim |
06:13:43 | * | xkapastel joined #nim |
06:41:37 | FromGitter | <Paalon> Why the first code can run but the second becomes error? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b14df21ba1a351a68ea019a] |
06:49:13 | * | lainon joined #nim |
06:50:56 | * | skrylar joined #nim |
07:00:33 | * | Vladar joined #nim |
07:02:09 | FromGitter | <Varriount> !eval let b = 1;let c = 0.1;let d = b + c;echo d |
07:02:11 | NimBot | Compile failed: in.nim(1, 33) Error: type mismatch: got <int, float64> |
07:02:41 | Araq | because integer literal are special and when put into a 'let' the type 'int literal' becomes 'int' |
07:02:50 | * | yglukhov[i] joined #nim |
07:09:05 | FromGitter | <Varriount> Huh. I would have thought that int+float would convert the int to a float automatically |
07:14:29 | FromGitter | <Paalon> Ok. I see. |
07:16:50 | * | PMunch joined #nim |
07:17:49 | FromGitter | <Paalon> I'm rewriting lib/pure/complex.nim, and realized that there are `+`(complex, float) and `+`(float, complex) but not `+`(int, float) and `+`(float, int). |
07:19:04 | Araq | import lenientops |
07:21:18 | FromGitter | <Paalon> This seems inconsistent, so what should be the module complex? |
07:21:38 | FromGitter | <Paalon> Preparing lenientops for complex? |
07:21:54 | Araq | int is 64 bits |
07:21:57 | Araq | float is 64 bits |
07:22:04 | Araq | can't convert without losing information. |
07:22:22 | Araq | complex is based on floats, complex+float loses no information, should be supported. |
07:22:41 | FromGitter | <Varriount> On 32-bit platforms though, it would work. Hm. |
07:23:00 | FromGitter | <Paalon> There are no int + complex |
07:23:08 | Araq | we don't base language rules on what "would work on 32bits" |
07:25:08 | Araq | likewise complex+int would lose information |
07:25:46 | Araq | it all makes sense and I when I hear that word "inconsistent" once more, I'll rage quit for a month |
07:26:21 | Araq | ;-) |
07:27:28 | FromGitter | <Paalon> I understand. |
07:27:44 | Araq | "Inconsistency" comes into play after you understand the set of rules and you detect a violation of the rules. It is not a fancy word for "I am not sure I understand this and I'm a smart guy and in Python it's different, hence 'inconsistent'" |
07:28:47 | FromGitter | <Paalon> I think we should support int + complex like lenientops does. |
07:37:23 | FromGitter | <Paalon> I think it's not inconsistent |
07:39:58 | Araq | well create a PR and let me see how you solve it |
07:43:03 | FromGitter | <Paalon> OK. Thanks. |
07:46:00 | PMunch | Is > and >= just a template over |
07:46:03 | PMunch | < |
07:46:28 | PMunch | I noticed that there's no > and >= in lenientops, only < and <= |
07:46:44 | PMunch | Hi everyone by the way, been away for a while :P |
08:02:57 | * | gmpreussner quit (Ping timeout: 240 seconds) |
08:05:46 | * | gmpreussner_ joined #nim |
08:08:21 | FromGitter | <alehander42> hey : ) |
08:09:11 | PMunch | Hi |
08:09:36 | FromGitter | <gokr> PMunch: Saw your combparser thingy |
08:09:54 | PMunch | Oh, thoughts? |
08:10:23 | FromGitter | <gokr> I haven't looked closely, but I always loved working with PetitParser in Smalltalk - which also is a parser combinator. |
08:10:49 | PMunch | If you want a larger and more readable example you can check out https://github.com/PMunch/protobuf-nim/blob/master/src/protobuf/private/parse.nim |
08:12:04 | FromGitter | <gokr> Are they dynamic or are you also doing compile time stuff? |
08:12:57 | FromGitter | <gokr> Ah, could run on compile time it says. |
08:12:59 | PMunch | It's all turned into procs, apart from the root parsers which are templates that creates procs to get instantiation information |
08:14:45 | PMunch | Basically a parser is a proc that takes an input and outputs a parser result which contains error messages and all that stuff |
08:15:19 | PMunch | I have a fix that I've yet to push that speeds it up a whole lot as well, using my strslice library |
08:17:24 | PMunch | But I might also add in a table of fixed errors and map to that instead of copying all the error strings. Since errors can be removed by something like an "or" combinator a lot of the error messages are simply never seen, nor relevant. So having the overhead of copying them into memory doesn't make much sense. |
08:17:42 | PMunch | And I want to flesh out the onerror thing a bit more as well, would be nice to do both at the same time. |
08:18:24 | PMunch | With onerror you can create more meaningful error messages than the massive stack-trace looking thing it currently spits out |
08:19:12 | Araq | PMunch: welcome back. |
08:19:49 | Araq | one thing I would like a parser generator to do is to produce an AST out of the box. and the AST should be based on my packedjson ideas... |
08:22:28 | PMunch | Hmm, interesting |
08:23:08 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:24:15 | PMunch | So packedjson identifies were in the string values are, and then converts them on demand to the type it should have? |
08:26:23 | PMunch | TBH the combparser library is a bit misguided for Nim. It is heavily influenced by the functional way of doing things, while in Nim it would probably be better to have a macro that returned a more optimized parser. |
08:28:48 | PMunch | Haven't looked at how glossolalia works, but that looks promising |
08:31:27 | * | lainon quit (Ping timeout: 240 seconds) |
08:37:22 | * | skrylar quit (Remote host closed the connection) |
08:42:09 | * | ftsf quit (Quit: Leaving) |
08:43:05 | Yardanico | GitLab right now :D https://i.imgur.com/dFMRm5a.png |
08:50:12 | * | floppydh joined #nim |
08:51:48 | Araq | PMunch: that's just an implementation detail but the core of the idea is that things stay in compressed form and then accessors uncompress. |
08:52:34 | Araq | so it's as convenient to work with as it always was, it's just that the accessors now have something to do and are not just cargo cult OO practice |
08:57:06 | * | Arrrrrrrrrr joined #nim |
08:59:27 | * | athenot joined #nim |
09:01:38 | Arrrrrrrrrr | https://github.com/nim-lang/Nim/issues/7917 I don't think is this a good idea. I'd rather initialize variables by assigning them a type than typing its default value every time. |
09:04:15 | Araq | Arrrrrrrrrr: well but the existing Nim requires you to write 'var x = initTable' instead of 'var x: Table' and the assignment is conceptually much cleaner |
09:04:56 | Araq | I don't see how you can argue for 'var x: Table' tbh |
09:07:31 | Arrrrrrrrrr | Yeah, maybe except for table and one or two more types. For the rest I like to either directly assign a value (var done = false) or rely in default assignment (var done: bool) |
09:07:41 | Arrrrrrrrrr | That measure would imply doing both. |
09:07:51 | Yardanico | Arrrrrrrrrr https://github.com/nim-lang/Nim/issues/7917#issuecomment-394182090 |
09:08:18 | Yardanico | so we'll be able to provide default values in type declarations it seems :) |
09:09:17 | Arrrrrrrrrr | But it is more common to define primitive variables. |
09:09:56 | Arrrrrrrrrr | *variables with a primitive type |
09:10:31 | Yardanico | yeah I know, and a lot of Nim code relies on it AFAIK |
09:10:56 | Yardanico | but if it will happen, it should happen before 1.0 :) |
09:11:19 | Yardanico | (and I don't mind it if it would help to optimize Nim even more) |
09:15:44 | Arrrrrrrrrr | I don't know why it would make the code more optimized, what's the difference with forcing you to assign a 'false' vs the compiler whenever a value is not assigned? I don't see a problem here. For objects maybe it would avoid issues with nil, that's right. With objects, It is more the fact that null works different than mistakenly forgetting an assignment. For that reason I could sympathize with the 'not nil' rule |
09:16:50 | Araq | var b: bool # please compiler, check that every code path sets it |
09:16:58 | Araq | is a valuable feature in its own right |
09:17:07 | Araq | vs. |
09:17:18 | Araq | var b = false # start with the 'false' value. |
09:17:29 | Araq | I don't see why it would be annoying. |
09:17:58 | Araq | if you argued "omg, I need to update so much code then" then you would have my sympathy, but you don't... |
09:18:05 | FromGitter | <survivorm> btw, not been looking for some time. Is there a way to parse json Node to some complex type out of the box? |
09:18:30 | Araq | yeah, the json.nim module support that, the macro is called 'to' iirc |
09:19:21 | yglukhov | I've got lots of code with `var v: T` pattern without specialization. I Is it bad? |
09:19:53 | FromGitter | <survivorm> @Araq thanks! |
09:20:28 | Araq | yglukhov: well the Nim compiler is FULL of this. |
09:20:43 | Araq | expect a long transition period with warnings instead of errors. |
09:21:26 | yglukhov | hmm.. but i kinda like this pattern... what's wrong about it? |
09:21:32 | Arrrrrrrrrr | I don't know much about the compiler, I thought it would be more obvious to tell if a variable was already assigned or not. I don't mind directly assigning a value, and probably I use it a lot. But I'm happy with the alternative for cases where I know what the def value but direct assignment looks ugly, for example: 'var shit = 0'u64' or 'var blah = uint8(45)'. |
09:22:04 | Araq | ugly as opposed to what alternative? |
09:22:06 | Arrrrrrrrrr | Well, the last case doesn't count |
09:22:24 | Araq | the 0'u64 syntax is there in ordinary assignments too. |
09:23:04 | Arrrrrrrrrr | I mean, It is more readable 'var myVar: int64' than 'var myVar = 0'i64/int64(0)'. |
09:24:19 | Arrrrrrrrrr | The process goes like "This var is of type X. I can imagine the default value" vs "This var is of type X initialized as Y". B gives more obvious information. |
09:25:02 | Arrrrrrrrrr | Except for some types where the initialization is way simpler (bools) or where you cannot avoid it (your table example) |
09:25:56 | Araq | 'var myVar: int64' is implicit, an explicit zero makes more sense to me |
09:26:49 | Arrrrrrrrrr | Yes, but it is so common and obvious you eventually internalize it, like in 24 hours. Consider the cpFile, newSeq, etc ... what is cp, what is seq? |
09:27:09 | Araq | yglukhov: how else would I get the "check every code path sets it" feature? 'var myVar: int64 = void' ? |
09:27:47 | yglukhov | the cases where implicit init makes sense to me is conditional initialization. var a: T; if cond: a = 1 else: a = 2... Another case is by var init. var a: T; init(a) |
09:28:26 | yglukhov | Araq: well the problem is only not-nils, right? |
09:28:43 | yglukhov | Everything else is perfectly fine with implicit init |
09:29:30 | yglukhov | Also enums with weird 0 meaning, i guess... |
09:29:45 | FromGitter | <alehander42> @Araq have you had problems with wrong "similar" EqResult in karax before? |
09:30:17 | Araq | alehander42: not really, I'm unaware of any remaining bugs with the DOM diffing |
09:31:07 | Araq | yglukhov: well historically default(T) was just there to ensure memory safety, and it quickly turned into an idiom. |
09:31:43 | Araq | but now we have better ways to do it, do some simple minded control flow analysis. like Java did in the 90ies. |
09:32:37 | Araq | and given that it doesn't work well for nil, enums I found it fair to deprecate it altogether |
09:32:48 | FromGitter | <alehander42> yeah, diffing has been great & very stable for me for a long time |
09:33:01 | FromGitter | <alehander42> I'll try to reproduce my problem in a smaller program, but it would be very hard |
09:36:16 | Araq | well you can start by adding echos into karax.nim |
09:36:40 | Araq | 'nimble develop' is excellent. |
09:37:28 | Araq | maybe you can fix it more easily than reproducing it in a smaller program :-) |
09:38:21 | yglukhov | Araq: i'm not sure i understand what the problem is. init verification should be done only for locations which can't be 0. that's either not nils or some enums. explicit initialization doesn't always make sense: `var someInts: array[10, int]; getSomeInts(someInts);`. I don't mind about not-nils init requirement, but even then it can often be verified through codeflow analysis. |
09:40:59 | Araq | lol, now I have to bring up the "consistency" word. treating all types the same creates a more consistent language. |
09:41:34 | FromGitter | <alehander42> ahhhh |
09:41:35 | FromGitter | <alehander42> https://github.com/pragmagic/karax/commit/87edc4cdb9ac9de6ec50b4cd19bb1ce6e503a3f5 |
09:41:40 | FromGitter | <alehander42> I suspect this is my bug :D |
09:43:43 | yglukhov | what should i do with `var someInts: array[10, int];` then? all these patterns with be just found and replaced with `var someInts = default(array[10, int])`? except what do we do with `{.noInit.}`? |
09:44:24 | Arrrrrrrrrr | You are going to destroy many lifes |
09:44:47 | Araq | ok ok, fine, let's turn this into a vote |
09:45:00 | Araq | I personally don't mind much either way. |
09:45:47 | Arrrrrrrrrr | yglukhov: you should post your points about conditional initialization and arrays in that issue |
09:46:43 | Araq | the "init by var T" idiom is a big problem, I have to admit |
09:47:14 | Araq | and might turn into an 'init by out T' which we lack. |
09:47:37 | PMunch | How does changing values work in packedjson by the way? Does it modify the string? That has to be costly |
09:47:54 | * | yglukhov[i] quit (Remote host closed the connection) |
09:48:25 | Araq | it modifies the string in place, it is costly. |
09:49:15 | Araq | when that causes problems, use the traditional json.nim :P |
09:49:39 | Araq | note that for ASTs this is usually fine as you need to re-create a transformed AST anyway |
09:49:51 | Araq | for different reasons |
09:50:58 | PMunch | Oh yeah, I was just wondering |
09:51:33 | PMunch | Technically you could keep a ledger of changes that only got applied when you needed to write the JSON back out |
09:51:46 | Araq | too complex. |
09:54:06 | Araq | alehander42: that should only have performance consequences |
10:00:52 | * | Arrrrrrrrrr quit (Quit: Page closed) |
10:07:58 | FromGitter | <alehander42> @Araq it's strange, with different instead of similar there, I get into a something that seems like an infinite loop in diff |
10:08:47 | FromGitter | <alehander42> well that's not true, e.g. updateStyles would be called only for similar |
10:08:58 | FromGitter | <alehander42> which is my original issue (it updates a node with the wrong class) |
10:09:10 | Araq | the algorithm is nuts |
10:09:23 | Araq | we should replace it back to its former, simpler variant |
10:09:49 | Araq | it is over-optimized to some benchmark IMO |
10:10:06 | * | nsf quit (Quit: WeeChat 2.1) |
10:10:12 | Araq | and faces exponential blowups in fringe cases that I never really got rid of |
10:12:06 | FromGitter | <alehander42> but I can't really understand how it can go into a loop (it seems to me, from my logs that it somehow repeats processing the same nodes, but I might be mistaken, and it might be just exponential combinations) |
10:12:54 | FromGitter | <alehander42> well, with the old "similar" value in that branch, it seems to almost work correctly here, otherwise I didn't have any other problems overally |
10:13:37 | FromGitter | <alehander42> maybe it can support the simpler one and a "optimized" diff strategy so users can choose one? or that would be too complicated |
10:15:40 | * | thomasross quit (Read error: Connection reset by peer) |
10:17:36 | * | nsf joined #nim |
10:20:36 | * | girvo quit (*.net *.split) |
10:21:26 | * | girvo joined #nim |
10:22:17 | FromGitter | <alehander42> actually the old behavior "similar" even looks 100% correct in that branch in my case, my problem comes from `if a.class != b.class or not eq(a.style, b.style) or not sameAttrs(a, b):` (but probably even before that, somehow the wrong nodes seem to be mapped to each other) |
10:22:26 | FromGitter | <alehander42> but I'll make a workaround for now |
10:39:59 | dom96 | So let's have a vote: who thinks Microsoft will ruin GitHub? |
10:40:12 | Yardanico | -1 from me, I don't think it will |
10:40:27 | dom96 | Yeah, I'm cautiously optimistic |
10:40:45 | dom96 | you never know, but MS is different now |
10:40:48 | PMunch | I'm cautiously neutral.. |
10:41:08 | PMunch | I have a feeling that they will mess it up, but I really really hope they won't |
10:41:58 | PMunch | dom96, that sounds like someone in an abusive relationship "oh but he has changed, he only requires Windows Live login when he's drunk" |
10:43:43 | Yardanico | well, new Microsoft is much different from old Microsoft :) |
10:43:52 | Yardanico | for example - they don't earn a lot of money on Windows anymore |
10:44:25 | euantor | No, they earn money on services like GitHub. Hopefully that doesn't mean aggressive monetisation of GitHub |
10:45:01 | Yardanico | yeah |
10:49:40 | * | yglukhov[i] joined #nim |
10:50:12 | * | xet7 quit (Remote host closed the connection) |
10:51:44 | FromGitter | <alehander42> I am more afraid of google, than ms these days |
10:52:09 | FromGitter | <alehander42> ms make some great developer tools & awesome system/language research |
10:53:52 | * | yglukhov[i] quit (Remote host closed the connection) |
10:54:08 | * | yglukhov[i] joined #nim |
10:54:17 | FromGitter | <alehander42> at least it seems that quality github code tooling aligns somehow with their interest, but I have no idea, people say skype & linkedin suck more now, is it true |
10:56:01 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:56:03 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
10:56:16 | FromGitter | <mratsim> Google has a tendency to start tons of stuff and abandon them (Google+, Google Reader), it lacks coherency. |
10:56:22 | * | yglukhov[i] joined #nim |
10:58:15 | * | Kaynato quit (Read error: Connection reset by peer) |
10:58:35 | * | athenot joined #nim |
10:58:42 | * | Kaynato joined #nim |
10:59:10 | PMunch | Skype pretty much got gutted and turned into a glorified web-app |
10:59:28 | PMunch | Never really used LinkedIn so I'm not sure about that.. |
11:00:00 | * | athenot quit (Client Quit) |
11:05:38 | * | Yardanico quit (Ping timeout: 260 seconds) |
11:10:52 | FromGitter | <alehander42> anyway, gitlab etc are always there, so I am not too concerned (I use gitlab a lot , honestly github's + is mostly the existing OS communities) |
11:12:29 | Araq | uh yeah, Skype got worse with its ads |
11:23:13 | * | Yardanico joined #nim |
11:52:33 | PMunch | Yardanico, I just updated binaryparse to fix your issue. Care to try it out? |
11:52:37 | Yardanico | yeah |
11:57:30 | Yardanico | PMunch yeah, that works. also wanted to ask - do you plan to add support for little endian? |
12:02:04 | * | arecaceae quit (Remote host closed the connection) |
12:02:28 | * | arecaceae joined #nim |
12:10:42 | * | fvs joined #nim |
12:13:15 | FromGitter | <mratsim> LinkedIn is turning into Facebook (for the silly posts) + Twitter (for the bot accounts) but that’s not Microsoft fault. |
12:13:50 | * | Snircle joined #nim |
12:15:02 | PMunch | Yardanico, I am considering it. But I'm not sure how I would do it |
12:15:15 | Yardanico | PMunch did you see NESM? |
12:15:33 | PMunch | I mean converting 32-bit or 64-bit integers to big or little endian is fair enough, but a 3 bit integer? |
12:15:41 | Yardanico | well, yeah |
12:15:56 | Yardanico | https://github.com/xomachine/NESM |
12:16:04 | PMunch | Hmm. no I haven't seen that |
12:16:37 | Yardanico | it's very complex too and supports a lot of stuff |
12:16:47 | Yardanico | https://xomachine.github.io/NESM/ |
12:18:11 | Yardanico | the only downside to it - it doesn't actually support custom-sized integers |
12:19:49 | PMunch | Yeah, I wanted binaryparse to be very little magic. Only specify your format and off you go |
12:20:17 | PMunch | I got inspired from stuff I was doing at work with CCSDS headers for spacecraft data |
12:20:41 | PMunch | And I actually ended up using it a couple months after I wrote it when I was tasked with creating some test data |
12:27:51 | PMunch | So custom-sized integers were a must, as many of the headers use them for different things |
12:35:47 | * | endragor quit (Remote host closed the connection) |
12:39:52 | * | athenot joined #nim |
12:41:20 | * | athenot quit (Client Quit) |
12:48:14 | FromGitter | <data-man> @Araq: my system.nim contains everything from typetraits, various sugar (toOpenArray for strings, |=, &=, ^=, etc.) and honey (LoopUnrollingStep, prefetch* templates). Honey is experimental. ⏎ BTW #7944 is updated. |
12:48:21 | * | nsf quit (Quit: WeeChat 2.1) |
12:50:05 | * | endragor joined #nim |
12:52:51 | FromGitter | <mratsim> `^=` ? |
12:53:09 | FromGitter | <mratsim> `^` is pow btw, not `xor` |
12:54:07 | FromGitter | <data-man> ```a = a xor b``` |
12:54:25 | * | endragor quit (Ping timeout: 248 seconds) |
12:54:34 | FromGitter | <data-man> As in C. |
12:55:10 | FromGitter | <mratsim> yeah but Nim is not C, and pronounceable words were preferred to symbols. |
13:00:14 | FromGitter | <data-man> Therefore I haven't made a PR. :) |
13:00:50 | Araq | good boy. :-) |
13:01:25 | Araq | btw I came to the conclusion that the implicit 'import system' was a mistake. |
13:01:39 | Yardanico | really? |
13:01:44 | PMunch | How so? |
13:01:46 | Araq | yeah, pretty much. |
13:02:06 | Araq | it doesn't save anything in non-toy examples |
13:02:21 | Araq | which end up importing strutils or os or something else anyway |
13:02:29 | Araq | it makes |
13:02:34 | Araq | import system except foo, bar |
13:02:41 | Araq | really hard to support internally |
13:03:01 | FromGitter | <data-man> Can we split system to tiny modules? |
13:03:02 | Araq | and it means people push for their favorite shortcuts into system.nim |
13:03:22 | Araq | because system.nim is so special. |
13:04:10 | PMunch | Hmm, all good points |
13:04:18 | PMunch | What is in systems.nim anyways? |
13:04:34 | Araq | integers, strings, seqs, io routines |
13:05:06 | Araq | magics like isMainModule, etc etc |
13:05:16 | FromGitter | <data-man> systemtypes.nim, systemio.nim, etc. ? |
13:05:28 | PMunch | Wait, all the types are in system. What would you be able to do without it? :P |
13:05:36 | Araq | I wouldn't mind that, data-man |
13:05:45 | Araq | the details need to be fleshed out though. |
13:05:47 | PMunch | I guess it's too late now though, that would break all of existing Nim code.. |
13:05:58 | FromGitter | <Varriount> Araq: I'm in favor of the explicit initialization, especially if it gives us "uninitialized variable" detection. |
13:06:30 | Araq | PMunch: well I can envision a transition period, but we have more important things to work on |
13:07:45 | FromGitter | <data-man> We need RFC for this (split system.nim) :) |
13:08:03 | Araq | yup |
13:08:23 | Araq | probably start with "move IO routines to io.nim" |
13:08:35 | Araq | "except echo because echo is everybody's darling" |
13:09:30 | Araq | PMunch: you would need to import it, but it would also be more obvious how to import alternative system.nim implementations |
13:09:57 | Araq | which wouldn't be all that crazy given Nim's .magic hooks |
13:10:07 | Araq | that make sytem.nim tick. |
13:10:39 | PMunch | True |
13:12:01 | Araq | also 'include prelude' exists and is probably under-developed |
13:12:23 | Araq | but it solves the problem more elegantly IMO. |
13:18:05 | dom96 | It's too late for this IMO |
13:19:13 | FromGitter | <data-man> I need help for memmapstream for Windows. Currently the same file can't be opened for writing and for reading in Windows. This would be useful for interprocess communication. |
13:19:31 | FromGitter | <mratsim> Good luck with that |
13:19:38 | FromGitter | <data-man> :) |
13:19:52 | FromGitter | <mratsim> Microsoft still doesn’t solve it properly for Excel files on shared drives |
13:20:05 | FromGitter | <mratsim> sometimes you lock yourself out of the file |
13:20:41 | FromGitter | <mratsim> open an Excel file, and try to upload it to an email for example, it will error out. |
13:22:45 | FromGitter | <data-man> AFAIR in Windows 10 something was improved for memmapping. |
13:22:59 | FromGitter | <Varriount> Of course, you could go the other direction, and make something like `var foo: ref Bar` automatically allocate. |
13:29:34 | Araq | varriount: sounds terrible :-) |
13:31:19 | Araq | data-man: unicode PR? |
13:31:26 | * | DarkArctic joined #nim |
13:32:45 | FromGitter | <data-man> Opinions about Unicode RFC? #7902 |
13:38:27 | Araq | mmm? RFC? |
13:38:29 | Yardanico | new github header |
13:38:31 | Yardanico | https://github.com/ |
13:38:45 | Yardanico | https://blog.github.com/2018-06-04-github-microsoft/ |
13:43:50 | FromGitter | <data-man> Currently genunitables can be used so: ```genunitables <Unicode version> <Emoji Version>```. I can set data's version or links to beta .txt files. ⏎ This script download data from unicode.org and generates unitables.inc. unicode.nim includes this file. |
13:44:33 | PMunch | Yardanico, and so it begins |
13:49:24 | FromGitter | <data-man> I think genhtmlentities are also needed for htmlparser. We have very outdated data. |
13:49:25 | Araq | data-man: sounds good, just make it point to the latest stable Unicode version (11?) |
13:50:22 | Araq | these got updated recently iirc ? |
13:51:07 | Araq | anyway, that would be a separate PR. and HTML entities are a relict of pre-Unicode times IMO. |
13:51:44 | FromGitter | <data-man> Unicode 11.0 will released in this month, AFAIK. |
13:52:20 | FromGitter | <data-man> Official latest is 10.0 |
13:53:17 | FromGitter | <data-man> So unitables.inc or unitables.nim? |
13:55:24 | Yardanico | inc? |
13:55:54 | FromGitter | <data-man> for including :) |
13:59:46 | Araq | .nim |
13:59:58 | Araq | we are not FPC, .inc files are not a thing here |
14:04:16 | FromGitter | <data-man> I doubt about emoji. According to https://www.unicode.org/Public/emoji/11.0/emoji-data.txt decimal digits are also emoji. :) |
14:09:09 | Araq | who cares about emojis. |
14:09:13 | Araq | :P |
14:10:43 | FromGitter | <data-man> It's me. :) |
14:11:54 | Araq | always remember: Bojack doesn't twitter emojis. |
14:15:04 | dom96 | *tweet |
14:17:14 | Araq | oh yeah, thanks. |
14:17:24 | Araq | in German it's a verb :P |
14:18:55 | FromGitter | <data-man> BoJack Horseman? :) (I googled it) |
14:20:05 | * | yglukhov_ joined #nim |
14:21:50 | Araq | sure |
14:23:32 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
14:45:31 | PMunch | Hmm, no one have been crazy enough to write a XLSX reader with styling support in Nim yet? |
14:47:11 | * | endragor joined #nim |
14:53:10 | * | PMunch quit (Quit: Leaving) |
15:05:26 | FromGitter | <data-man> @PMunch: wrapper for https://github.com/brechtsanders/xlsxio ? |
15:10:29 | * | Trustable joined #nim |
15:14:40 | * | donotturnoff joined #nim |
15:18:02 | * | lainon joined #nim |
15:19:37 | FromGitter | <alehander42> @Araq my gf still calls you bojack horseman, when I talk to her about Nim, I think she doesn't remember your real name |
15:20:20 | FromGitter | <alehander42> @PMunch isn't xlsx excel files? what kind of style do they include |
15:21:06 | Araq | alehander42: I don't mind |
15:21:41 | FromGitter | <alehander42> I really can't think of more breaking thing than requiring import system.nim, but it would make sense in a way |
15:23:19 | Araq | I won't do it but it would make sense :P |
15:24:35 | * | endragor_ joined #nim |
15:25:47 | * | endragor_ quit (Remote host closed the connection) |
15:27:57 | * | endragor quit (Ping timeout: 240 seconds) |
15:28:35 | FromGitter | <data-man> I don't remember the exact version of Delphi, system.pas was splitted into several modules. |
15:28:54 | FromGitter | <data-man> It's good example. :) |
15:31:23 | FromGitter | <alehander42> did pascal also have system.pas :O :D |
15:31:39 | FromGitter | <data-man> Yes! :) |
15:36:12 | Araq | it never was splitted. |
15:36:18 | Araq | I think. |
15:36:30 | * | yglukhov_ quit (Read error: Connection reset by peer) |
15:37:02 | * | yglukhov[i] joined #nim |
15:44:15 | FromGitter | <data-man> http://docwiki.embarcadero.com/Libraries/Tokyo/en/System :) |
15:46:51 | Araq | http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.IEnumerable part of System.pas |
15:46:58 | FromGitter | <data-man> That I want http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Types |
15:47:11 | Araq | I don't see how it supports your claims :P |
15:48:00 | Araq | System.Types lacks Integer for all I can tell |
15:48:06 | FromGitter | <data-man> We need RFC :) |
15:49:27 | Araq | all they did is make System a directory too with plenty of modules in it |
15:49:45 | * | shashlick joined #nim |
15:51:51 | FromGitter | <data-man> If module A imports systemio.nim should systemio.nim exports systemtypes.nim? |
15:58:55 | * | donotturnoff quit (Quit: Leaving) |
16:06:03 | * | leru joined #nim |
16:09:23 | * | PMunch joined #nim |
16:11:39 | * | miran joined #nim |
16:24:41 | * | xet7 joined #nim |
16:29:36 | leru | Good evening! Are there any plans to quit GitHub? |
16:30:17 | PMunch | Haha, we talked a bit about it earlier |
16:30:20 | FromGitter | <data-man> https://github.com/craigbarnes/dte/issues/141 - Move to GitLab as primary repo/issue host :) |
16:30:51 | PMunch | I think the general consensus was to wait and see if Microsoft turns GitHub into the new Skype/LinkedIn |
16:31:04 | PMunch | Or possibly when.. |
16:33:46 | * | xkapastel joined #nim |
16:34:05 | ehmry | i was hoping now that the nim forum is done nim hub is next |
16:34:21 | miran | i can't believe all the reactions about MS and github |
16:34:59 | * | floppydh quit (Quit: WeeChat 2.1) |
16:36:23 | PMunch | I honestly expected more |
16:36:51 | miran | i bet at least 1/3 of those people use windows |
16:36:54 | FromGitter | <data-man> Can DigitalOcean host a git server? |
16:36:57 | miran | and 1/5 use vs code |
16:38:08 | FromGitter | <Electrux> Wait… u guys are moving from GitHub? |
16:38:34 | PMunch | Electrux, nothing planned AFAIK |
16:40:01 | FromGitter | <data-man> My vote goes to Fossil :) |
16:40:25 | PMunch | There's nothing wrong with Git though.. |
16:40:45 | ldlework | Or github. Chances are, nothing at all happens for years. |
16:40:46 | Yardanico | @data-man Git is better because more people know it |
16:40:49 | Yardanico | yeah |
16:41:02 | Yardanico | and don't forget that this agreement between github and microsoft should go through regulators |
16:41:12 | Yardanico | so it will officially happen somewhere in the end of 2018 |
16:41:46 | FromGitter | <Electrux> i am kinda skeptical about microsoft, i do trust github, but m too lazy to bother moving anything… guess which one has the highest score :P |
16:42:03 | Yardanico | I don't really think that Microsoft will do anything bad about GitHubn |
16:42:16 | FromGitter | <Electrux> i hope so :) |
16:42:21 | Yardanico | they know that people will immediately migrate to other alternatives |
16:42:42 | PMunch | With all their issues, contributors, and PRs on GitHub? |
16:42:44 | Yardanico | (well, some people are already doing it) |
16:42:47 | ldlework | Yeah they just spent 7 billion dollars on it |
16:42:58 | PMunch | That will be a tough migration process |
16:42:58 | FromGitter | <Electrux> although i can’t imagine why would github sell at all. i imagine it would have been doing financially pretty well |
16:43:20 | PMunch | Well, as far as I can tell they did decently. But they were struggling with finding a new CEO |
16:43:26 | PMunch | Or something like that |
16:43:34 | ldlework | Not 7 billion dollars well. |
16:43:45 | PMunch | Oh no, that's for the users |
16:43:55 | ldlework | Right but from the perspective of the company |
16:44:05 | ldlework | However good the company was doing, it wasn't doing 7 billion dollars good. |
16:44:17 | PMunch | No as I said, that's for the users |
16:44:24 | ldlework | I'm addressing the reason why github would sell |
16:44:25 | PMunch | Remember, if the product is free, you are the product |
16:44:37 | ldlework | the assumption "they were doing pretty well" means they wouldn't sell for 7 billion |
16:44:46 | FromGitter | <Electrux> so… nim is free :O |
16:44:48 | Yardanico | initial rumors were about $5 |
16:44:49 | * | ldlework rubs his forehead. |
16:45:17 | PMunch | And while GitHub has private paid repositories I can guarantee you that Microsoft will want to harvest a little bit of that sweet, sweet data and "integrate" it with LinkedIn or something.. |
16:45:50 | PMunch | Yardanico, I would buy GitHub for $5 |
16:45:58 | Yardanico | PMunch well, I've meant $5 billion :D |
16:46:01 | PMunch | Haha :P |
16:46:06 | FromGitter | <Electrux> lol |
16:46:13 | miran | will somebody buy nim? :P |
16:46:24 | Yardanico | miran I hope, but not *buy*, but *support* |
16:46:34 | miran | potato-potato :D |
16:46:44 | Yardanico | miran like mozilla supporting rust :) |
16:46:45 | Yardanico | or apple supporting llvm :) |
16:46:54 | miran | M$ supporting nim? :D |
16:47:04 | Yardanico | yeah, that would be pretty good :D |
16:47:11 | Yardanico | but they already have their C# and Typescript |
16:47:17 | FromGitter | <Electrux> if MS starts harvesting off github, m moving all the way to zip based version control xD |
16:47:24 | FromGitter | <data-man> I know one great candidate for this :) |
16:47:25 | Yardanico | why? just host your gitlab instance |
16:47:33 | miran | @Electrux why not gitlab? |
16:47:35 | PMunch | Yeah, paid support/feature priority is probably the most common commercial model for programming languages and tools |
16:47:44 | FromGitter | <Electrux> nim > C# and Typescript… just saying... |
16:47:45 | Yardanico | PMunch and nim has that too :P |
16:47:47 | ldlework | There's no reason to change your VCS because of the acquisition. |
16:48:11 | PMunch | Let's start mailing Nim back and forth as a zip file! |
16:48:28 | FromGitter | <Electrux> Miran: well, because what i said was a joke and apparently, u destroyed my poor little joke :’( |
16:48:30 | FromGitter | <Electrux> xD |
16:48:35 | miran | haha, sorry |
16:48:50 | miran | been reading too much of "the end of the world is coming" comments |
16:48:53 | Yardanico | @Electrux don't worry :) |
16:49:13 | * | Arrrrrrrrrr joined #nim |
16:49:31 | ehmry | I plan certainly plan to move the repos I control, but not until the dust settles |
16:49:33 | Arrrrrrrrrr | Hi. I read somewhere that nim is going to migrate to sourceforge. Is this really true? |
16:50:10 | FromGitter | <Electrux> Eh, as far as github works fine for me without harvesting *too much* of my data, i m fine with whoever acquires it |
16:50:12 | Yardanico | Arrrrrrrrrr no :) |
16:50:26 | dom96 | Yardanico: I'd say that Mozilla definitely owns Rust |
16:51:21 | FromGitter | <Electrux> :O |
16:51:41 | dom96 | Arrrrrrrrrr: Yep, I for one think wherever Nim is hosted should have an Internet Speed Test feature. SourceForge offers that amazing feature! /s |
16:51:42 | FromGitter | <Electrux> i liked rust… till i realized how much i had to use the error handling :( |
16:51:58 | FromGitter | <Electrux> lol |
16:53:39 | FromGitter | <zetashift> I wouldn't want Microsoft supporting Nim, mainly because of F# getting no love from MS |
16:53:57 | Yardanico | well, I started using nim (as I said multiple times) because it looked like Python, and Rust looked too "wordy" |
16:54:08 | FromGitter | <Electrux> ^ exactly my reason |
16:54:21 | Arrrrrrrrrr | Microsoft would hire Araq to work on C#. Then Nim would die. |
16:54:31 | FromGitter | <Electrux> lol and python is too popular for me to like it xD dont get me wrong, it’s great… just too popular :P |
16:54:46 | miran | @zetashift oh, it would be great if F# received more love.... |
16:58:02 | Yardanico | @Electrux if you're using something which is not very popular, it somehow feels like you're taking a bigger part in the community :) |
16:58:16 | FromGitter | <Electrux> EXACTLY!!!! |
16:58:24 | Yardanico | e.g. there are tons of python repositories on github, and only 2k+ nim repositories |
16:58:28 | ldlework | I really enjoy F# |
16:58:40 | miran | +1 |
16:58:41 | FromGitter | <Electrux> it feels like m not just another drop in the whole wide ocean |
16:58:46 | PMunch | Hmm, git-dit looks interesting |
17:02:04 | Araq | Arrrrrrrrrr: lol SourceForge, I've been tinkering with Fossil / Chisel fwiw |
17:02:18 | Araq | but I did that before github's acquisition :P |
17:04:01 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
17:05:24 | Arrrrrrrrrr | what's the advantage? |
17:08:32 | FromGitter | <data-man> @Varriount why #7415 was closed? You have some benchmarks? |
17:12:57 | Yardanico | Arrrrrrrrrr fossil says it's better for projects where there's not a lot of main developers :D |
17:13:02 | ldlework | https://monitor.gitlab.net/dashboard/db/github-importer?orgId=1&panelId=5&fullscreen&from=now-2d&to=now |
17:13:05 | Yardanico | "SQLite uses cathedral-style development. 95% of the code in SQLite comes from just three programmers, 64% from just the lead developer. And all SQLite developers know each other well and interact daily. Fossil is designed for this development model." |
17:13:14 | Yardanico | sounds a bit similar to nim :D |
17:13:38 | Arrrrrrrrrr | lol yes, only araq and dom contributes, and they are probably the same person. |
17:14:23 | Yardanico | no, they have a lot of different opinions :) |
17:14:34 | FromGitter | <data-man> Yes, we can see it on videos from FOSDEM. :-D |
17:14:44 | Yardanico | don't you see them argue fairly frequently in repositories? |
17:14:45 | Yardanico | *in repository |
17:14:58 | Arrrrrrrrrr | They never argue at the same time, guess why. |
17:15:21 | PMunch | Who's to say it's just one person trying to drum up discussion?! |
17:15:30 | Araq | Fossil is awesome because it's not Git, not because of this cathedral-style nonsense |
17:15:46 | Yardanico | Araq well, it's on their page about differences |
17:15:53 | ldlework | As far as I'm concerned, the universe is just a solipsistic projection of mental phenomena and you're all me. |
17:16:03 | ldlework | Prove me wrong. |
17:16:42 | ldlework | (that was a joke) |
17:17:35 | Yardanico | well, ok, let's move into #nim-offtopic :P |
17:17:38 | Araq | anyway, Nim started on some Python based DVCS |
17:17:47 | Araq | don't remember the name |
17:18:02 | Araq | darcs? |
17:18:09 | FromGitter | <data-man> Mercurial? :) |
17:18:45 | FromGitter | <zetashift> https://pijul.org/ also looks promising |
17:19:08 | Araq | no, darcs was that Haskell thingie |
17:19:38 | FromGitter | <zetashift> however what github did well was ease of creating a community around a project |
17:20:38 | Araq | "Bazaar", I think. |
17:20:40 | FromGitter | <zetashift> for better or worse I guess |
17:20:57 | Araq | and then people demanded git/github and I moved it over there |
17:21:32 | FromGitter | <data-man> Pijul written on Rust :) |
17:21:34 | Arrrrrrrrrr | Would you change the nest again? |
17:22:10 | Araq | Arrrrrrrrrr: yes. |
17:22:41 | Araq | but not without taking the issues/PRs with us, of course |
17:22:46 | FromGitter | <zetashift> you could just mirror the nim repo to gitlab something similiar to satisfy the leavers? |
17:22:59 | Araq | and not without good reasons. |
17:23:18 | Yardanico | @zetashift it's already mirrored |
17:23:29 | Yardanico | but mirroring failed 2 weeks ago for some reason, I said that to Araq :) |
17:23:48 | Yardanico | and you couldn't make PRs to Nim repo from GitLab anyway :D |
17:24:17 | Araq | "do it because M$ sux bolls and Linux rulez" is not a good reason |
17:24:22 | Araq | ;-) |
17:24:26 | Arrrrrrrrrr | Well github is still the biggest git hosting community, that's hard to ignore |
17:25:30 | FromGitter | <alehander42> sadly I think git is way too mainstream now, even mercurial doesn't seem close |
17:26:35 | FromGitter | <alehander42> otherwise I wondered if gitlab will try to mirror the github "stats" for projects? a lot of os projects wouldn't want to leave all their contribs/stars/watchers behind , but I guess such a feature would be too invasive |
17:27:13 | ehmry | github was too centralized, so I think what happend is a good thing anyway |
17:27:42 | Arrrrrrrrrr | I don't think anything happened. Most migrations come from personal/small projects. |
17:28:27 | Arrrrrrrrrr | Not yet the time from decentralization. |
17:28:31 | Arrrrrrrrrr | *for |
17:29:38 | FromGitter | <alehander42> @Araq is there a unifiying "core" reason why some comb explosions happen in diffing? or are they all different random issues |
17:30:13 | FromGitter | <alehander42> (I know I can try to debug it all, but I really don't want to go there if I can find a workaround) |
17:30:15 | FromGitter | <data-man> Why talk only about GitLab? There is also BitBucket. |
17:30:43 | leru | Just in case you haven't seen this yet: Many people migrating to GitLab alredy: https://monitor.gitlab.net/dashboard/db/github-importer?orgId=1 |
17:31:03 | Yardanico | yeah, I shared that today, but maybe not many people saw it |
17:31:20 | Yardanico | but I don't think that's "a lot of people migrating to GitLab" |
17:31:27 | Yardanico | maybe it's just a copy in case something goes very badly |
17:31:34 | Yardanico | or they just wanted to try GitLab |
17:32:41 | FromGitter | <data-man> GitLab so slow for me. :( |
17:33:53 | Yardanico | well, I think they're under a high load right now :D |
17:34:17 | Yardanico | usually gitlab is pretty fast |
17:34:32 | ldlework | scaling. it is hard. |
17:35:42 | FromGitter | <data-man> There is http://repo.or.cz also. :) |
17:35:48 | leru | I don't believe M$ won't fuck up GitHub. See Windows, OneNote, Skype, Nokia, Minecraft. I have a very bad feeling about that acquisition |
17:36:22 | Araq | alehander42: yes, the reason being "the algorithm is wrong" |
17:36:41 | Araq | er, "Is bad" |
17:36:52 | Araq | I never really understood why though :-) |
17:37:32 | Yardanico | leru how did they fuck up Minecraft? |
17:37:55 | Yardanico | it's only better with Windows 10 C++ version (but of course it would be better if it was a standalone app) |
17:38:20 | FromGitter | <alehander42> @Araq I see :D |
17:38:43 | FromGitter | <alehander42> and the previous "simpler" algorithm, how far back should I go in the commit history to compare it ? |
17:39:05 | Araq | far. |
17:39:23 | Araq | it's easier to remove the prefix/suffix detection logic |
17:39:31 | Araq | and see if it makes a difference |
17:39:49 | Araq | I think it causes the exponential explosions |
17:40:28 | leru | Yardanico, they're advertising the c++ version a lot and making it harder and harder for the java version. Minecraft's popularity is coming from the modding scene though. There are no real mods to the C++ version |
17:40:33 | * | nsf joined #nim |
17:45:36 | * | endragor joined #nim |
17:47:16 | * | endragor_ joined #nim |
17:49:29 | FromGitter | <alehander42> @Araq indeed, I commented out some prefix/suffix logic and it doesn't explode now, but it "forgets" and doesn't update some stuff :D |
17:49:45 | FromGitter | <alehander42> I have to spend some more time on it this week |
17:49:59 | * | endragor quit (Ping timeout: 256 seconds) |
17:52:04 | Arrrrrrrrrr | Good night |
17:52:06 | * | Arrrrrrrrrr quit (Quit: Page closed) |
17:57:33 | FromGitter | <zetashift> nokia was dying already(as well as windows phone), but for example linkedin is also doing alright, no real involvement of MS just like you'll want with GH |
18:01:42 | FromGitter | <kinkinkijkin> > @kinkinkijkin Oh!, your code theme looks nice, What font-family and theme setup are you using in you editor? ⏎ I'm two days late @faustinoaq but it's the font cherry by someone I know on discord, and it's a custom colour theme in vim |
18:02:05 | FromGitter | <kinkinkijkin> oof quotes do the whole thing eh |
18:02:12 | leru | Conspiracy maybe idk: Nokia was dying because it was infiltrated by microsoft. Look up Stephen Elop |
18:02:20 | FromGitter | <kinkinkijkin> sorry I only have this chat open when I'm doing programming in nim |
18:10:15 | * | leru quit (Quit: Leaving) |
18:13:25 | * | natrys joined #nim |
18:15:32 | * | endragor_ quit (Remote host closed the connection) |
18:20:07 | FromGitter | <kinkinkijkin> how exactly do I use the json parsing stuff? I want to fetch the name of an item which has a certain property |
18:20:10 | * | nsf quit (Quit: WeeChat 2.1) |
18:20:21 | PMunch | What da you mean? |
18:20:38 | FromGitter | <kinkinkijkin> like, I'm trying tto figure out how to use it at all |
18:20:55 | FromGitter | <kinkinkijkin> and the guide on it in the docs isn't the most helpful |
18:21:11 | FromGitter | <kinkinkijkin> specifically I'm running a tool that returns a json and I want to parse it |
18:21:45 | FromGitter | <kinkinkijkin> currently I just run jq on it in the tool's commandline but that's slower |
18:21:50 | PMunch | parseJson |
18:22:21 | PMunch | stdin.readAll.parseJson |
18:22:35 | PMunch | If you pipe it to your program |
18:23:06 | FromGitter | <kinkinkijkin> currently using execProcess |
18:23:21 | PMunch | Ugh, play.nim-lang.org should be fixed so gists works.. |
18:23:50 | PMunch | Okay, so execProcess(<args>).parseJson |
18:24:25 | PMunch | Or maybe .string.parseJson as execProcess returns a TaintedString |
18:24:25 | * | gb00s joined #nim |
18:25:21 | FromGitter | <kinkinkijkin> I'm not using taintmode |
18:25:27 | FromGitter | <kinkinkijkin> so it doesn't really matter |
18:26:57 | Yardanico | @kinkinkijkin get a string from the process |
18:27:02 | Yardanico | and parse it using parseJson ? |
18:29:15 | FromGitter | <kinkinkijkin> okay, that's done, how would I then get say, which items in the json have the value "urgent" ? |
18:29:22 | FromGitter | <kinkinkijkin> as true |
18:30:01 | PMunch | myJson["urgent"] |
18:30:14 | PMunch | Where myJson is the result of parseJson |
18:30:18 | Yardanico | yeah, and if it's a string, you would call .getStr() |
18:30:22 | PMunch | Oh yeah |
18:30:25 | Yardanico | (refer to the docs for more procs) |
18:30:51 | Yardanico | !eval import json; echo parseJson("""{"a": 1}""")["a"].getNum() |
18:30:53 | FromGitter | <kinkinkijkin> so would I just check each entry and see if its "urgent" value is true? |
18:30:55 | NimBot | 1 |
18:31:15 | Yardanico | @kinkinkijkin wait, so your json contains an array of elements? |
18:31:18 | dom96 | kinkinkijkin: hrm, how can we improve the docs? |
18:31:19 | FromGitter | <kinkinkijkin> yes |
18:31:27 | Yardanico | @kinkinkijkin use getElems then |
18:31:44 | Yardanico | and honestly json docs are not bad |
18:32:03 | dom96 | You access arrays just like you would normally: jArray[0] |
18:33:30 | Yardanico | well, he wants to check if "urgent" is true |
18:33:38 | Yardanico | for every element |
18:36:08 | dom96 | for item in jArray: echo item["urgent"].getBool() |
18:42:52 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
18:43:25 | * | yglukhov[i] joined #nim |
18:52:56 | livcd | did anyone already make a joke about MS acquiring Nim ? |
18:53:18 | Yardanico | yes |
18:53:29 | Yardanico | at least in Telegram :) |
18:53:32 | miran | livcd: that would be me... |
18:53:45 | livcd | oh ok! atleast i asked |
18:54:24 | PMunch | livcd, yes :) |
18:54:40 | PMunch | https://i.imgur.com/4Be8wz1.png |
18:55:49 | livcd | well anyway the new microsoft is a good microsoft. People should complain when they actually hit issues with MS/GH behaving differently than usual |
18:57:39 | dom96 | The best thing about this acquisition is the new meme power |
18:57:42 | PMunch | It's a better Microsoft |
18:57:49 | PMunch | Haha |
18:58:04 | livcd | well the .net core step was a big deal :) |
18:58:11 | livcd | sorry for being off topic |
18:59:17 | PMunch | Haha, this channel has been off-topic for most of today :P |
18:59:30 | PMunch | As long as no-one actually needs help I don't think anyone minds |
18:59:51 | FromGitter | <kinkinkijkin> I do need help but I don't mind this |
19:01:11 | PMunch | Oh, I didn't realise you still needed help. Still struggling with JSON? |
19:01:19 | FromGitter | <kinkinkijkin> yeah |
19:01:45 | livcd | PMunch: i know but sometimes araq does not like it :D |
19:02:23 | livcd | anyone that used Vim/Emacs that switched to something else ? |
19:02:40 | livcd | kinda tired of bugs when updating the editor |
19:03:39 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
19:03:55 | PMunch | What kind of bugs are you having |
19:04:00 | PMunch | I haven't had any trouble with Vim |
19:04:08 | PMunch | Or are you talking about Vim/Nim integration? |
19:04:13 | FromGitter | <kinkinkijkin> https://i.imgur.com/C5nn7qG.png I think this will work but I won't be able to compile for a while |
19:04:25 | FromGitter | <kinkinkijkin> admittedly this is quite a bit cleaner and faster than what I was doing before |
19:04:36 | livcd | I have updated emacs to 26.1 and I have a trouble opening an .org file. It opens it and start org-mode but it does not behave correctly |
19:04:43 | * | yglukhov[i] joined #nim |
19:05:06 | livcd | well for Nim i use vscode because most of you guys are on vscode and i know it works by default :D |
19:05:23 | Yardanico | livcd I'm using VSCode too |
19:05:32 | Yardanico | because there are no nim extensions better than one for vscode |
19:05:52 | Yardanico | @kinkinkijkin btw, you don't need to specify type of currfocpsace |
19:05:53 | PMunch | kinkinkijkin, have you seen https://github.com/FedericoCeratto/nim-i3ipc |
19:06:04 | PMunch | And please share code snippets as text.. |
19:06:12 | PMunch | That way I could actually try it |
19:07:31 | livcd | Yardanico: tinkering with configurations is tiring :/ |
19:07:38 | Yardanico | what configurations? |
19:07:48 | livcd | i mean usually..so i am glad vscode just works with Nim |
19:09:14 | livcd | even gopath was bit of a nuisance |
19:11:57 | FromGitter | <kinkinkijkin> @pmunch I'm not a fan of importing nonstandard libraries |
19:12:38 | PMunch | What? Why? |
19:12:49 | PMunch | You'll be doing a lot of wheel-reinventing |
19:13:07 | FromGitter | <kinkinkijkin> usually there's some licensing stuff to deal with and I get more stress from that than redoing things myself as I need them |
19:13:27 | FromGitter | <kinkinkijkin> I also generate smaller binaries by tailoring my implementation to exactly what I'm doing |
19:13:44 | livcd | everything has its cons and pros |
19:13:47 | PMunch | Eh, whatever floats your boat I guess |
19:14:08 | PMunch | But yeah, I think your code should do about what you need |
19:14:10 | Yardanico | @kinkinkijkin why wouldn't you write your own OS for your needs then? :P |
19:14:24 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
19:14:27 | Yardanico | (just a joke) |
19:14:39 | FromGitter | <kinkinkijkin> I've actually thought of doing that |
19:16:30 | PMunch | Haven't we all :) |
19:16:55 | dom96 | kinkinkijkin: looks like that will work |
19:17:04 | dom96 | But `== true` is really redundant |
19:17:17 | FromGitter | <kinkinkijkin> oops forgot about that |
19:17:22 | FromGitter | <kinkinkijkin> haven't done code in mooooooonths |
19:18:44 | livcd | yglukhov: are you working on some new game ? :) |
19:21:33 | livcd | uh and i just realized yglukhov works for a company that gave us mackeeper :D |
19:22:29 | Yardanico | wait what? |
19:22:50 | livcd | that's what internet says |
19:25:04 | dom96 | what? |
19:25:09 | dom96 | link? |
19:28:54 | livcd | Zeo alliance founders created mackeeper |
19:30:45 | FromGitter | <kinkinkijkin> okay it works :) |
19:30:51 | FromGitter | <kinkinkijkin> no more help needed |
19:32:10 | FromGitter | <kinkinkijkin> yeah I just cut off most of the cpu usage from that |
19:32:10 | FromGitter | <kinkinkijkin> good |
19:32:28 | FromGitter | <kinkinkijkin> it was only 1% on this cpu but it was still 1% |
19:39:54 | * | lainon quit (Ping timeout: 260 seconds) |
19:43:48 | Araq | also give packedjson a try |
19:45:23 | * | Trustable quit (Remote host closed the connection) |
20:00:08 | * | leorize joined #nim |
20:02:11 | Yardanico | is there any tutorial/example for pegs? I want to try to use it for parsing mathematical expressions (AFAIK that's possible) |
20:02:29 | Yardanico | ah, probably it won't work |
20:10:40 | * | nsf joined #nim |
20:11:29 | FromGitter | <Varriount> @dom96: Does nimforum handle CORS? |
20:14:51 | FromGitter | <Varriount> @data-man That's odd... I didn't click close on that ticket. |
20:16:23 | * | icebattl1 joined #nim |
20:17:22 | PMunch | Probably Microsoft deeming it done /s |
20:17:36 | * | PMunch puts on tinfoil hat |
20:19:05 | * | icebattle quit (Ping timeout: 240 seconds) |
20:32:08 | FromGitter | <faustinoaq> @kinkinkijkin Oh, pk 👍 |
20:34:43 | shashlick | so who all have merge access on nim-lang/Nim? |
20:37:19 | Yardanico | shashlick only Araq knows :) |
20:37:48 | * | leru joined #nim |
20:38:00 | * | leru quit (Client Quit) |
20:39:52 | * | Sembei quit (Ping timeout: 256 seconds) |
20:40:50 | shashlick | that's one thing that's important for Nim to grow, multiple lieutenants with specific focus and access/freedom |
20:41:19 | shashlick | and it should be documented so you know who to work with in order to understand specific areas and to contribute PRs |
20:43:03 | Araq | not sure I'd agree with that |
20:44:16 | Araq | it's not clear to me how many contributions a single person can be responsible for before becoming a bottleneck |
20:44:47 | * | nsf quit (Quit: WeeChat 2.1) |
20:46:15 | * | lainon joined #nim |
20:46:25 | Araq | I mean, sure, I would love to delegate more of it. but a single person could easily handle all of it |
20:47:18 | Araq | anyway, what does need to be merged? |
20:48:34 | shashlick | i'm just asking in general but that's the only way to scale |
20:52:30 | * | PMunch quit (Quit: leaving) |
20:53:08 | shashlick | in all honesty, I know my PRs sit around for a while until someone has time to look at them and merge, it's not quite discouraging but definitely boring |
20:53:54 | * | yglukhov_ joined #nim |
20:54:35 | FromGitter | <Varriount> shashlick: My policy is to only review PRs for the standard library. I don't have the necessary knowledge to adequately evaluate compiler-related PRs. |
20:54:40 | shashlick | it's also uncomfortable to keep nagging you and dom96 to look at them, I don't know who else can review, coach and merge. It's not like you guys have nothing better to do |
20:54:53 | FromGitter | <Varriount> shashlick: You can bug me. |
20:55:05 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
20:55:43 | shashlick | ultimately, the way to expand our collaborators is to help coach and guide people till they get the Nim way and for that you need to know who to work with |
20:55:50 | Araq | shashlick: yeah, that's true, but we don't necessarily need multiple lieutenants, a single person would do |
20:55:54 | FromGitter | <Varriount> shashlick: What's your github username? |
20:55:58 | shashlick | varriount: yes, I've seen you merging stuff in recently |
20:55:59 | Araq | if that person had enough time... :-) |
20:56:05 | * | miran quit (Ping timeout: 245 seconds) |
20:56:29 | shashlick | araq: genotrance <= but no one has enough time, that's why i feel divison of labor is good |
20:57:08 | Araq | yeah and I feel a single person could improve the quality of the review process |
20:57:10 | shashlick | no doubt nim-lang/Nim is a giant repo and I don't think github has fine grained enough access permissions to restrict what kind of PRs a person can merge |
20:58:46 | shashlick | you really need someone who can help guide and coach and make the next batch of contributors and coaches |
21:00:02 | shashlick | also applies to the many other repos like c2nim, nimble, choosenim, nimforum, etc. |
21:02:25 | Araq | well it's hard :P |
21:02:31 | Araq | take this one: https://github.com/nim-lang/Nim/pull/7907 |
21:02:44 | Araq | it's a simple fix with a test case. |
21:03:04 | Araq | why haven't I merged it already? what the fuck is wrong with me? |
21:03:41 | Araq | problem is: this fix makes no sense to me. I know the lexer's logic and this patch should make no difference whatsoever |
21:03:56 | * | Vladar quit (Quit: Leaving) |
21:04:28 | Araq | I'm probably wrong and it's a correct fix. but I need to understand it too, effectively I have to debug it on my own to be sure |
21:05:17 | FromGitter | <Varriount> Araq: You could ask for the change to be explained? |
21:06:03 | Araq | that's bad for scaling but in the past I accepted PRs without this understanding and then I get back into the compiler's code and am I like "WTF? what is this crap..." |
21:06:25 | Araq | varriount: I wouldn't buy the explanation. |
21:08:29 | Araq | now I can see the fix is in fact correct. |
21:09:36 | Araq | but I'm unhappy with the test :P |
21:10:24 | Araq | and it takes another roundtrip to GULPF... |
21:10:39 | Araq | it's frustrating but I don't see how to do better. |
21:10:58 | Araq | often I merge and correct things later myself but that is not free either. |
21:11:19 | shashlick | that's exactly how it should work but we need more araq's out there :) |
21:11:28 | FromGitter | <Varriount> If it makes you feel better, Python has the same problem. |
21:11:46 | shashlick | or at least pseudo araqs who can take care of lesser things like build, installer, CI, etc. |
21:12:01 | shashlick | groom experts in specific areas |
21:12:20 | shashlick | nim is too big, let alone any of the extended repos |
21:12:52 | shashlick | someone should be the httpclient expert for example, so any PRs related to that, they can handle |
21:13:35 | Araq | well other parts have different problems. |
21:13:51 | Araq | httpclient has way too few tests afaict |
21:14:16 | Araq | and so every change is an exercise in playing with fire. |
21:15:15 | shashlick | anyway, I'm not saying I have a solution, but I feel more skilled hands = more progress |
21:15:28 | Araq | tests are really better at catching problems than a review process is. |
21:15:48 | shashlick | but skilled hands have to be groomed and invested in to get there |
21:16:18 | shashlick | and more hands = more diverging opinions which also need to be managed effectively |
21:16:41 | Araq | well I've been refactoring the compiler's internals a lot in order to help contributors |
21:17:08 | Araq | and I should probably invest more time in "live coding" the compiler. |
21:17:26 | Araq | but for httpclient please write a test suite :P |
21:17:30 | shashlick | :D |
21:17:52 | shashlick | who should I nag to merge that test case PR? ;) |
21:18:09 | Araq | which one? |
21:20:03 | shashlick | this not yet done httpclient test suite PR that you want |
21:21:20 | Araq | well you can nag me. |
21:29:49 | shashlick | that's what I don't like, should I let you work on compiler bugs or 1.0 or other cool features or a lowly test case PR for httpclient |
21:30:33 | shashlick | should I nag dom96 for my nimble and choosenim PRs or let him improve the forum |
21:30:42 | shashlick | these simpler things should get delegated as much as possible |
21:31:40 | shashlick | every PR you see can distract from bigger things |
21:31:49 | shashlick | take up thought space which could be utilized better |
21:40:53 | Araq | ok, so nag varriount about it :-) |
21:42:07 | * | lainon quit (Quit: Leaving) |
21:45:35 | shashlick | brilliant :) |
21:45:52 | dom96 | Yes, we do need more people. But not just any people, passionate people. |
21:46:06 | shashlick | varriount: you in the US right? I can nag you even later in the day! |
21:46:47 | shashlick | dom96: we need to get more collaborators into your projects as well - nimble, choosenim, etc. |
21:47:58 | dom96 | I wonder if adopting a Linux-based style system would work for us. |
21:48:55 | dom96 | Hrm, I'm probably not clear: I mean how the Linux project handles contributions |
21:49:05 | shashlick | that helps |
21:49:06 | FromGitter | <alehander42> what is the linux-based system |
21:49:11 | shashlick | not sure how they do it |
21:49:20 | FromGitter | <alehander42> the hierarchical lieutenants? |
21:49:41 | dom96 | I'm not 100% sure how it works to be honest heh |
21:50:04 | dom96 | But AFAIK Linus gets a big diff at the end and he can either trust the people below him or review the diffs |
21:50:06 | dom96 | or a mix of both |
21:50:37 | dom96 | the people below him review smaller diffs for the corresponding subprojects (network, core, drivers, etc.) |
21:51:10 | FromGitter | <alehander42> I see, so he gets the most "promising"/improved PR-s |
21:51:41 | dom96 | yeah, so it's like a progressive filter |
21:53:11 | * | xet7 quit (Remote host closed the connection) |
21:55:10 | dom96 | In any case, regarding the Nimble PR I'm afraid you'll have to wait a bit longer |
21:55:20 | dom96 | Jester is at the top of my priority list right now |
21:55:33 | dom96 | and another top secret project that I'm working on for myself :) |
21:56:28 | shashlick | No worries, I'm okay waiting and last thing I want to do is hold you guys up with smaller things |
21:56:56 | shashlick | But it's something that needs to be figured out at a program level - you need to delegate |
21:57:30 | shashlick | For agility and for giving people ownership |
21:57:48 | shashlick | Then they will be passionate and diligent |
21:57:52 | dom96 | Yes, well, volunteers welcome |
21:58:04 | dom96 | There is nothing stopping people from reviewing your PR |
21:58:27 | FromGitter | <xmonader> How are you guys :( |
21:58:44 | shashlick | But will it still wait for you to merge |
21:58:51 | dom96 | xmonader: why so sad? |
21:59:07 | shashlick | It's about building trust and letting go of less important stuff |
21:59:31 | shashlick | What you do and don't deem important is your call |
21:59:33 | FromGitter | <xmonader> @dom96 because I don't do enough nim these days and my year goals aren't happening |
21:59:59 | dom96 | xmonader: ahh, don't worry about it. There is still plenty of this year left :) |
22:00:51 | FromGitter | <xmonader> I hope so thanks |
22:05:00 | dom96 | I'm really curious what this person is up to https://github.com/tbrand/which_is_the_fastest/issues/227 |
22:05:51 | * | lainon joined #nim |
22:07:09 | FromGitter | <xmonader> @dom96 it's not clear why he needs to set the post body manually? but i quickly checked his python version https://github.com/tbrand/which_is_the_fastest/blob/master/python/flask/server.py |
22:07:40 | FromGitter | <xmonader> which is just wrong benchmarking anyways because ppl run servers with uwsgi anyways |
22:09:24 | FromGitter | <Varriount> shashlick: I'm available for nagging. :D |
22:09:49 | FromGitter | <Varriount> shashlick: You can ping me in gitter, preferably. I get way too many emails from github. |
22:12:25 | FromGitter | <Yardanico> Lol, what, Apple deprecated OpenGL and OpenGL in macOS 10.14 |
22:13:44 | FromGitter | <Yardanico> https://developer.apple.com/macos/whats-new/ |
22:14:12 | shashlick | varriount: sounds good 👍 |
22:17:35 | dom96 | Yardanico: :'( |
22:19:54 | * | krux02 joined #nim |
22:20:52 | * | rockcavera is now known as Guest56914 |
22:20:52 | * | tiorock joined #nim |
22:20:52 | * | Guest56914 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
22:20:52 | * | tiorock is now known as rockcavera |
22:24:06 | dom96 | Network Framework, hrm, interesting |
22:36:21 | FromDiscord | <ethanpmorgan> Are there any libs for gif creation? |
22:38:31 | dom96 | https://github.com/ftsf/gifenc https://github.com/rxi/gifwriter |
22:39:07 | FromDiscord | <ethanpmorgan> Ah thanks Dom |
22:48:05 | * | natrys quit (Quit: natrys) |
22:58:09 | FromGitter | <honewatson> Is there anything for generating travis configs/Readme/Changelogs for nimble projects? |
23:04:27 | * | lainon quit (Ping timeout: 240 seconds) |
23:12:59 | * | find0x90 joined #nim |
23:25:49 | FromGitter | <zetashift> I'm stumbling upon a proc defined as ``` proc `position = `*(self: Node2D, val: Vector2) ``` how the hell do I use it |
23:26:27 | FromGitter | <zetashift> I'm trying to use it like ```position = velocity * speed``` but then I get an error saying position can't be assigned to |
23:27:34 | FromGitter | <data-man> @zetashift: ```proc `position= `*(self: var Node2D, val: Vector2)``` ? |
23:28:25 | FromGitter | <zetashift> I meant using this: https://pragmagic.github.io/godot-nim/v0.5.3/godotapi/node_2d.html#=,Node2D,Vector2 proc in code |
23:28:54 | FromGitter | <zetashift> or calling that proc actually |
23:31:04 | FromGitter | <zetashift> So how I call a proc in those backticks(I've seen it before used as ``` `type` ``` but the ``` position = ``` confuses me a bit |
23:31:40 | FromGitter | <data-man> Why there is space between ```position``` and ```=```? |
23:31:59 | FromGitter | <zetashift> no idea :D |
23:32:20 | FromGitter | <data-man> Try remove it. :) |
23:34:04 | FromGitter | <zetashift> ah thanks |
23:34:21 | FromGitter | <data-man> Good night! |
23:35:36 | FromGitter | <zetashift> yep you too |
23:42:36 | * | lainon joined #nim |
23:42:59 | * | lainon is now known as Guest28788 |
23:43:12 | * | find0x90 quit (Quit: find0x90) |
23:45:57 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
23:50:53 | * | Guest28788 quit (Quit: Leaving) |
23:55:14 | * | leorize quit (Read error: Connection reset by peer) |