00:04:31 | * | dddddd quit (Ping timeout: 256 seconds) |
00:05:24 | * | vendethiel quit (Ping timeout: 276 seconds) |
00:06:24 | solidsnack | Say I have a handle x and a handle y. I would like to copy the contents of x to y without buffering all of x. |
00:06:27 | solidsnack | Is this easy? |
00:06:45 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:11:50 | * | aaronk quit (Quit: Page closed) |
00:13:24 | Varriount | -_- |
00:14:13 | vikaton | wat ? |
00:15:54 | * | vendethiel joined #nim |
00:16:23 | fowl | Maybe? Handle is incredibly vague. If x and y are files for ex you don't need to read them to overwrite y with x |
00:17:16 | Varriount | fowl: If it's a file handle, some systems provide facilities to copy files. |
00:17:26 | * | vikaton quit () |
00:24:17 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:27:48 | * | BitPuffin|osx joined #nim |
00:35:28 | * | kumul joined #nim |
00:39:12 | * | vendethiel quit (Ping timeout: 276 seconds) |
00:43:54 | Varriount | Anyone here have the expertise to decide if Nim should use link-time-optimization by default? |
01:12:16 | * | saml_ joined #nim |
01:16:12 | * | solidsnack joined #nim |
01:18:41 | * | solidsnack quit (Client Quit) |
01:18:44 | * | jaco60 quit (Ping timeout: 265 seconds) |
01:19:19 | * | ozra quit (Ping timeout: 246 seconds) |
01:19:32 | * | solidsnack joined #nim |
01:21:47 | * | Matthias247 quit (Read error: Connection reset by peer) |
01:24:53 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
01:35:13 | * | jackv quit (Ping timeout: 264 seconds) |
01:53:58 | * | xificurC quit (Remote host closed the connection) |
01:54:32 | * | xificurC joined #nim |
01:59:31 | * | vendethiel joined #nim |
02:19:25 | * | bjz quit (Max SendQ exceeded) |
02:20:04 | * | bjz joined #nim |
02:20:36 | * | vendethiel quit (Ping timeout: 244 seconds) |
02:22:34 | * | darkf joined #nim |
02:38:43 | * | pregressive quit (Remote host closed the connection) |
02:47:57 | Varriount | flaviu: What was your motivation for using Optional[] instead of exceptions/nil for nre? |
02:49:58 | Varriount | I find it... odd using two different methods for handling exceptional cases. |
03:09:01 | * | solidsnack joined #nim |
03:10:42 | * | saml_ quit (Quit: Leaving) |
03:14:49 | * | vendethiel joined #nim |
03:16:12 | * | Demon_Fox_ joined #nim |
03:16:18 | * | Demon_Fox quit (Ping timeout: 264 seconds) |
03:24:28 | * | bassa quit (Read error: Connection reset by peer) |
03:31:59 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:11:12 | * | Dragonbird joined #nim |
04:26:43 | * | Dragonbird quit (Quit: This computer has gone to sleep) |
04:35:55 | * | vendethiel quit (Ping timeout: 250 seconds) |
05:02:30 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
05:03:45 | * | johnsoft quit (Ping timeout: 240 seconds) |
05:04:08 | * | johnsoft joined #nim |
05:10:20 | * | rkj-b joined #nim |
05:11:11 | * | rkj-b quit (Client Quit) |
05:12:35 | * | Dragonbird joined #nim |
05:31:35 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:31:36 | * | Dragonbird quit (Quit: This computer has gone to sleep) |
05:32:03 | * | bjz joined #nim |
05:39:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:39:52 | * | pregressive joined #nim |
05:41:18 | * | pregressive quit (Remote host closed the connection) |
05:50:59 | * | Demon_Fox_ quit (Quit: Leaving) |
05:59:41 | * | Demon_Fox joined #nim |
06:13:37 | * | johnsoft quit (Ping timeout: 244 seconds) |
06:13:53 | * | johnsoft joined #nim |
06:20:03 | * | jackv joined #nim |
06:20:03 | * | jackv is now known as jackkv |
06:28:22 | * | frozen quit (Ping timeout: 246 seconds) |
06:36:25 | * | davidhq joined #nim |
06:42:43 | * | Mat4 joined #nim |
06:44:55 | * | Mat4 quit (Client Quit) |
06:47:30 | * | intra joined #nim |
07:11:09 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:12:00 | * | kumul quit (Ping timeout: 244 seconds) |
07:14:08 | * | Demon_Fox quit (Quit: Leaving) |
07:18:32 | * | davidhq joined #nim |
07:21:26 | * | BlaXpirit joined #nim |
07:28:43 | * | Jesin joined #nim |
07:41:34 | * | solidsnack joined #nim |
07:42:28 | * | jackkv quit (Quit: Leaving) |
07:45:35 | * | jackv joined #nim |
08:07:36 | wuehlmaus | an echo without newline is write(stdout, param) or is there a shorter way? |
08:08:16 | fowl | wuehlmaus: that's it |
08:08:20 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:08:56 | wuehlmaus | fowl: thanks |
08:17:15 | wuehlmaus | echo in a unix shell has \c to omit the newline |
08:18:11 | Varriount | wuehlmaus: Perhaps, one day, we can use keyword-only arguments to customize echo. |
08:27:57 | * | davidhq joined #nim |
08:29:10 | * | davidhq quit (Max SendQ exceeded) |
08:54:58 | * | bluenote_ joined #nim |
08:59:55 | * | solidsnack quit (Ping timeout: 265 seconds) |
08:59:55 | * | Matthias247 joined #nim |
09:10:40 | * | pminten joined #nim |
09:19:17 | * | vendethiel joined #nim |
09:31:54 | * | xcombelle joined #nim |
09:37:53 | * | pminten quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) |
09:42:13 | * | ddl_smurf quit (Quit: ddl_smurf) |
09:46:09 | * | BlaXpirit quit (Quit: Quit Konversation) |
09:46:19 | * | TEttinger quit (Ping timeout: 272 seconds) |
09:47:57 | * | BlaXpirit joined #nim |
09:53:44 | * | boopisaway is now known as boop |
09:57:51 | * | milosn quit (Quit: leaving) |
10:10:50 | * | jaco60 joined #nim |
10:25:31 | Varriount | Araq: I've whipped up a web scraper in Python to grab function and structure definitions from Microsoft's development website. |
10:28:15 | fowl | That's legit |
10:28:43 | Varriount | fowl: It's probably easier than trying to push the entire Windows Development Kit through c2nim |
10:29:02 | Varriount | And it gave me the chance to learn xpath |
10:29:50 | fowl | Varriount: do you have any experience with clangs parser |
10:30:05 | Varriount | fowl: No... |
10:30:27 | fowl | Ok |
10:30:41 | Varriount | Isn't Clang the C++ frontend to LLVM? |
10:30:54 | fowl | Yea |
10:46:10 | * | Kingsquee joined #nim |
10:57:31 | * | Trustable joined #nim |
11:01:27 | * | ozra joined #nim |
11:02:14 | * | Jehan` joined #nim |
11:06:11 | wuehlmaus | is aporia still maintained? i did not happen to install it using nimble |
11:07:20 | ozra | Araq: Are you around? There's some descrepancies between the literal number lexer and the BNF in the manual. Thought I better double check before applying the bug fix. |
11:07:39 | wuehlmaus | and i get quite some 'deprecated' errors |
11:09:23 | ozra | wuehlmaus: There's been depr var name changes in the compiler the other day, fresh from the press. Shouldn't be of worry.. |
11:09:56 | ozra | (might be what you're getting depr's for) |
11:11:00 | dom96 | wuehlmaus: yes. |
11:37:50 | Jehan` | wuehlmaus: You need to install from HEAD: nimble install aporia@#head |
11:38:01 | Jehan` | Deprecation is a different story. |
11:38:32 | Jehan` | Those are mostly just about types or procedures being renamed. |
11:46:49 | gokr | wuehlmaus: Several of us use Aporia, including Araq. So its maintained, although not evolving much at the moment. But its a neat light weight option. |
11:55:54 | * | Jehan` still uses Vim. "Hi, my name is Jehan, and I'm a Vim user." |
11:57:00 | wuehlmaus | Jehan`: me, too. it's one editor that is very difficult to crash, too. one of the most stable things i have seen on my linux box. |
11:57:19 | * | wuehlmaus uses vim since 1996 :) |
11:58:02 | Jehan` | wuehlmaus: https://bitbucket.org/behrends/ntags -- I wrote that specifically so that I could use Vim with Nim. :) |
11:58:26 | wuehlmaus | Jehan`: oh nice, i will have a look |
11:58:48 | * | shodan45_ joined #nim |
11:59:04 | * | shodan45 quit (Read error: Connection reset by peer) |
12:00:23 | * | xcombelle quit (Remote host closed the connection) |
12:01:08 | wuehlmaus | plus, vim rhymnes on nim :) |
12:01:16 | wuehlmaus | that's the ultimate reason! |
12:11:40 | Araq | Varriount: oh cool! |
12:11:52 | Araq | had to read it twice to understand what you're after |
12:11:59 | Araq | but yeah, kill windows.nim |
12:12:12 | * | gokr quit (Ping timeout: 265 seconds) |
12:12:24 | Araq | ozra: I'm here now |
12:15:38 | ozra | Araq: Cool. I printed out the source and read with the breakfast coffee. And there are two obvious solutions to the bug. I opt for the one generating the most reasonable and informative error message. However I need some clarification: Is o|c|C allowed for octal? (as mentioned in #2523, and as per source), and if so should it be in manual too - or should it remain un-doced feature? |
12:16:13 | Araq | document it |
12:16:20 | ozra | Ok. |
12:16:27 | ozra | I like the 'c' |
12:17:07 | ozra | Also, the checks in the source currently allow exponent with all bases except hex. But according to BNF it should only be allowed for decimal? |
12:17:52 | ozra | I'm having the feeling non decimal should just be to 'binarily' (cast style) create floats? |
12:18:10 | ozra | (when supplying 'f* postfix) |
12:19:40 | ozra | Araq: ^ |
12:20:02 | Araq | dunno |
12:20:11 | Araq | do whatever is easier to implement |
12:21:01 | Araq | the excessive syntax for number literals is annoying to maintain |
12:22:57 | ozra | I'll simply do what seems most reasonable - and if there's anything to it, we'll catch it in the PR review.. |
12:24:18 | ozra | Also - I'd find it nifty to be able to use `47f` to mean "most reasonable float-type on the platform" (most likely f64 in most cases for a forseeable future). What do you think of such a variation? |
12:24:49 | fowl | what meaning does 47 have |
12:25:01 | Araq | 43f shoudl be shortcut for 43f32 |
12:25:21 | fowl | oh |
12:26:06 | ozra | f32? When used as a literal, it will be involved in immediate calcs, and those are _amost always_ in f64 on the proc. f32 really just makes sense for arrays where cache-hit factor is of greater importance.. |
12:26:21 | ozra | Afaik |
12:26:55 | ozra | (immediate as in, not part of a memory "structure") |
12:28:08 | ozra | fowl: 47 is just the magic number. Usually use it in examples ;) (Oh, and 42 is wrong!) |
12:28:19 | ozra | ;-) |
12:30:21 | Senketsu | noo 42 is always right :\ |
12:31:25 | fowl | i read it as f47 |
12:32:14 | ozra | Senketsu: It's right enough ;-) |
12:32:52 | Jehan` | How many dots are there on a pair of six-sided dice? |
12:33:24 | fowl | (6+5+4+3+2+1) * 2 ? |
12:33:59 | fowl | ohh |
12:34:02 | Jehan` | :) |
12:34:54 | ozra | 47 is to cool for such simplicities ;-) |
12:35:15 | iznogoodd | ozra: id find it WAY more usefull to be able to do 47f for float32 |
12:35:23 | iznogoodd | since for float you can just 47.0 |
12:35:34 | iznogoodd | or 74.0f = float32 |
12:35:47 | iznogoodd | would remove mostpain from f32 stuff |
12:36:06 | iznogoodd | having to write 'f32 everywhere is a pain |
12:37:06 | ozra | Ok - cool. I'll add it like f32 - I guess it may be of more use for all those "gaming-opt" things, than sci use cases. It really should be figured from context though. But that's another thing. f32 it is. |
12:37:21 | iznogoodd | thx! |
12:37:46 | ozra | The masses has spoken! (dictator + en please) ;-) |
12:37:52 | ozra | *one* |
12:37:58 | iznogoodd | <3 |
12:38:05 | Jehan` | s = 0 |
12:38:05 | Jehan` | for ch in str(666**47): s += int(ch) |
12:38:05 | Jehan` | print s |
12:38:07 | * | gokr joined #nim |
12:38:09 | Jehan` | (That's Python.) |
12:38:31 | ozra | The suspense... What yields? |
12:38:42 | Jehan` | 666. |
12:38:53 | ozra | Rock on! |
12:39:47 | gokr | Btw, my silly rebolish lang in Nim calculates 3+4 :) |
12:40:16 | ozra | as 47? ;-) |
12:40:58 | Jehan` | If you define x+y as y*11+x, sure. :) |
12:41:41 | ozra | Jehan`: haha. Gotta love pattern matching stylee langs :) |
12:41:42 | * | Kingsquee quit (Quit: Konversation terminated!) |
12:42:26 | Jehan` | ozra: Actually, skew polynomials define a weird form of multiplication in a similar fashion. |
12:44:05 | ozra | Jehan`: Alright. I've learned math by practise (the very applied way to theory) so I'm not familiar with many terms, like skew * - must be a good thing then ;) |
12:44:28 | Jehan` | ozra: It's a pretty obscure concept from abstract algebra. |
12:44:32 | ozra | *googling from curiosity* |
12:45:09 | Jehan` | http://planetmath.org/skewpolynomialring |
12:45:53 | ozra | thanks. |
12:45:53 | Jehan` | Rings are algebraic constructs that support addition, subtraction, and multiplication (but not necessarily division). |
12:46:05 | Jehan` | Examples are the integers, matrices, or polynomials. |
12:46:17 | ozra | What does ring imply? |
12:46:45 | Jehan` | The skew comes from the multiplication being a "skewed" version of the original multiplication that still obeys distributive laws. |
12:47:36 | Jehan` | ozra: As I wrote, it's basically any algebraic construct that supports +, -, *, has an additive and multiplicative neutral element (zero and one) and obeys distributive and associative laws. |
12:48:08 | Jehan` | These conditions are sometimes relaxed, but the above is basically a summary of what your typical undergrad is told. |
12:48:36 | Jehan` | Obviously in a more mathematically rigorous form. :) |
12:49:10 | ozra | I've recently enjoyed reading up a bit on maths, since I use it so extensively, I've just come up with my own names and symbols for constructs that started re-occuring. When reading up I realize that many of my constructs are indeed named, symbolized things, so I find it good to learn a 'compatible way' of conveying it. |
12:50:08 | Jehan` | Ring theory is actually a pretty important part of abstract algebra, because so many important things are rings. |
12:50:25 | Jehan` | As I said, integers, matrices, and polynomials are classical examples of rings. |
12:50:58 | ozra | This will be my next 'relaxation time readup' :) Now though, time to squash number lexer bugs :-) |
12:51:16 | Jehan` | Heh. :) And not sure that I'd call it relaxing. :) |
12:52:15 | ozra | Haha, I'm always head over into projects. Reading math, or anything really, over coffee and cigarettes in the sunshine in the garden is relaxing to me :) (aka off-screen time) |
12:52:53 | ozra | This is also why I often debug code on paper. |
12:53:42 | * | Trustable quit (Remote host closed the connection) |
12:54:19 | * | saml_ joined #nim |
12:54:22 | iznogoodd | stop murdering trees |
12:54:28 | iznogoodd | monster |
12:54:35 | Jehan` | The trees were asking for it. :) |
12:54:43 | iznogoodd | =) |
12:56:49 | * | Matthias247 quit (Quit: Matthias247) |
12:57:41 | * | vikaton joined #nim |
12:58:44 | * | kumul joined #nim |
12:59:03 | vikaton | Hi |
13:00:33 | vikaton | I'm having a bit of an issue with get proc address |
13:01:03 | vikaton | https://www.irccloud.com/pastebin/vBXadeSP/ |
13:01:19 | vikaton | it returns nil but it shouldn't :/ |
13:11:22 | ozra | Araw: bubbler: what about also allowing `4247'd` for f64? in addition to `4247'f`? |
13:12:05 | * | BitPuffin|osx joined #nim |
13:12:49 | ozra | Araq: ^ |
13:17:04 | Araq | ozra: yeah why not |
13:17:24 | ozra | cool |
13:20:41 | * | vendethiel quit (Ping timeout: 250 seconds) |
13:21:06 | * | gokr quit (Ping timeout: 258 seconds) |
13:22:04 | * | gokr_ joined #nim |
13:24:19 | fowl | are closures not refs? when do they get freed? |
13:26:00 | Araq | a closure is internally a tuple (procVar, env) |
13:26:25 | Araq | the env part can be accessed via some system thing system.rawEnv iirc |
13:28:30 | fowl | but when does it get freeds |
13:28:32 | fowl | free'd |
13:29:25 | Jehan` | fowl: When it''s no longer reachable. |
13:29:49 | * | johnsoft quit (Ping timeout: 245 seconds) |
13:30:49 | * | milosn joined #nim |
13:30:57 | * | johnsoft joined #nim |
13:34:13 | vikaton | anyone? :( |
13:35:48 | * | Matthias247 joined #nim |
13:36:12 | fowl | vikaton, see how the dynlib module does it? |
13:36:52 | vikaton | Yeha I think I know that it already calls GetProcAddress |
13:37:06 | vikaton | but I want to check for myself in this case |
13:37:14 | fowl | oh good |
13:37:25 | fowl | i was just about to say thinking is probably than checking and hope you read the sarcasm :) |
13:38:08 | vikaton | heh |
13:39:04 | vikaton | anyhow, I don't know how2 fix this :/ |
13:40:22 | * | BlaXpirit is now known as Guest11615 |
13:40:22 | * | BlaXpirit_ joined #nim |
13:40:22 | * | Guest11615 quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
13:40:22 | * | BlaXpirit_ is now known as BlaXpirit |
13:42:32 | * | Sembei joined #nim |
13:42:33 | * | Pisuke quit (Ping timeout: 246 seconds) |
13:42:47 | flaviu | Varriount: RegexMatch is not a pointer, so it cannot be nil. |
13:43:26 | vikaton | fowl, I think the problem is because it's not recognizing MessageBox has a Proc name? |
13:43:46 | flaviu | exceptions require an unjustifiable number of clock cycles, for an event that isn't exceptional at all. |
13:44:09 | flaviu | Also, client syntax for exceptions would be incredibly verbose. |
13:44:13 | fowl | vikaton: I'm sure that dynlib uses the same function |
13:44:56 | vikaton | fowl, checkedSymAddr ? |
13:45:09 | Araq | vikaton: there is no "MessageBox" function in user32.dll |
13:45:17 | Araq | it's "MessageBoxA" or "MessageBoxW" |
13:45:22 | vikaton | o |
13:45:49 | Araq | and windows.nim already has wrappers for all of these things anyway |
13:45:55 | Araq | you don't have to wrap it on your own |
13:46:25 | vikaton | Araq, it's a learning process |
13:46:55 | * | bluenote_ quit (Ping timeout: 246 seconds) |
13:48:13 | vikaton | Araq, wait are you saying the methods like "MessageBox" is already called dynamically? |
13:48:40 | Araq | windows.MessageBox should already be available |
13:49:39 | fowl | Where is unsureAsgnRef? Does its usage imply closure envs are refs? |
13:50:10 | Araq | yes |
13:50:57 | fowl | Araq: what do those GC defines you said to add do? Will they report hanging references? |
13:51:31 | Araq | what's a "hanging" ref? |
13:51:39 | Araq | but I can already answer: No. |
13:53:15 | vikaton | is GetProcAddress's retun value stoed in eax ? |
13:53:18 | vikaton | stored* |
13:53:29 | fowl | I want to make sure no ref is kept alive after it should die |
13:54:48 | Araq | vikaton: yes |
13:55:07 | Araq | or RAX on x64 |
13:56:39 | vikaton | does Nim allow function pointers? |
13:57:40 | fowl | vikaton: proc type is a function pointer |
13:57:45 | Jehan` | Yes, though they aren't called function pointers. |
14:02:52 | * | Roin_ is now known as Roin |
14:05:32 | * | Siecje joined #nim |
14:06:25 | * | endragor joined #nim |
14:07:30 | * | endragor quit (Remote host closed the connection) |
14:27:31 | * | johnsoft quit (Ping timeout: 272 seconds) |
14:27:39 | * | johnsoft joined #nim |
14:37:12 | * | syncn quit (Quit: Lost terminal) |
14:41:29 | * | saml_ quit (Ping timeout: 245 seconds) |
14:42:33 | * | vendethiel joined #nim |
15:01:30 | * | gokr joined #nim |
15:02:49 | * | gokr_ quit (Ping timeout: 264 seconds) |
15:05:39 | * | gokr quit (Ping timeout: 245 seconds) |
15:06:14 | * | banister quit (Read error: Connection reset by peer) |
15:06:39 | * | darkf quit (Quit: Leaving) |
15:09:06 | * | gokr joined #nim |
15:10:48 | * | Arrrr joined #nim |
15:13:34 | * | gokr quit (Ping timeout: 245 seconds) |
15:14:14 | * | banister joined #nim |
15:15:35 | * | gokr_ joined #nim |
15:16:00 | * | gsingh93 joined #nim |
15:18:52 | * | banister quit (Client Quit) |
15:20:26 | * | Jehan` quit (Quit: Leaving) |
15:20:43 | * | Arrrrr joined #nim |
15:23:19 | * | Arrrr quit (Ping timeout: 250 seconds) |
15:24:55 | * | gokr joined #nim |
15:26:29 | * | gokr_ quit (Ping timeout: 245 seconds) |
15:32:36 | * | johnsoft quit (Ping timeout: 272 seconds) |
15:33:23 | * | johnsoft joined #nim |
15:33:59 | * | gokr quit (Ping timeout: 245 seconds) |
15:36:08 | * | banister joined #nim |
15:41:00 | * | gsingh93 quit (Ping timeout: 265 seconds) |
15:41:17 | * | banister quit (Read error: Connection reset by peer) |
15:41:29 | * | shodan45_ quit (Quit: Konversation terminated!) |
15:41:49 | * | gokr joined #nim |
15:42:17 | * | gsingh93 joined #nim |
15:46:35 | * | banister joined #nim |
15:46:38 | * | banister quit (Max SendQ exceeded) |
15:48:34 | * | gokr quit (Ping timeout: 245 seconds) |
15:50:20 | * | vendethiel quit (Ping timeout: 272 seconds) |
15:53:05 | * | banister joined #nim |
15:58:22 | * | gokr joined #nim |
16:07:25 | * | gokr_ joined #nim |
16:09:24 | * | gokr quit (Ping timeout: 245 seconds) |
16:12:28 | * | vendethiel joined #nim |
16:13:30 | * | vikaton quit () |
16:20:14 | jaco60 | hi... If i've noticed an error (or imprecision) in the manual, how to report it? |
16:21:50 | fowl | jaco60: the forums or github issues |
16:22:02 | jaco60 | thanks |
16:27:44 | * | gokr_ quit (Ping timeout: 245 seconds) |
16:32:44 | * | rgv151 joined #nim |
16:33:16 | * | gokr_ joined #nim |
16:33:24 | * | rgv151 quit (Remote host closed the connection) |
16:33:46 | * | rgv151 joined #nim |
16:46:22 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:56:35 | * | vendethiel quit (Ping timeout: 256 seconds) |
16:57:54 | BlaXpirit | uh guys, i think https://github.com/manastech/crystal/blob/master/src/libc.cr is wrong :/ |
16:58:04 | BlaXpirit | BAH wrong chat, sorry |
16:58:07 | reactormonk | jaco60, you can also put out a PR fixing it |
16:58:16 | reactormonk | BlaXpirit, heretic! |
16:58:27 | BlaXpirit | yes :| |
17:00:19 | * | vikaton joined #nim |
17:01:47 | * | gokr joined #nim |
17:02:39 | * | gsingh93 quit (Ping timeout: 276 seconds) |
17:03:40 | Arrrrr | enjoy your end end end |
17:04:49 | * | gokr_ quit (Ping timeout: 245 seconds) |
17:07:05 | dom96 | https://news.ycombinator.com/item?id=9630794 |
17:09:26 | dom96 | BlaXpirit: Are you betting on Crystal now? |
17:09:36 | BlaXpirit | pretty much |
17:09:59 | dom96 | how come? |
17:10:28 | BlaXpirit | it gives more advantages of interpreted languages |
17:10:35 | BlaXpirit | while being compiled |
17:11:24 | BlaXpirit | and standard library is made with thought |
17:11:44 | BlaXpirit | and elegance |
17:13:41 | dom96 | interesting. What advantages? |
17:14:14 | * | coffeepot joined #nim |
17:16:46 | * | BitPuffin|osx quit (Ping timeout: 265 seconds) |
17:18:19 | * | banister is now known as banisterfiend |
17:19:54 | * | vendethiel joined #nim |
17:22:37 | BlaXpirit | difficult to explain... dom96, generics are everywhere, with advanced inferring mechanisms based on usage, so you really never need to specify a type, not in declaration, not in function arguments or returns. and main thing that I see for the first time: "variant" types are implicitly created. so there is no need for an "Option" type, because it's just Type | Nil. there are many compile time tools to deal with these, but they don't |
17:22:38 | BlaXpirit | look out of place, just special optimized conditionals. |
17:24:55 | BlaXpirit | it doesn't have multiple inheritance, but at least it provides alternatives. you get duck typing, abstract classes or modules to include, which are a primitive and different form of inheritance |
17:25:07 | BlaXpirit | dynamic dispatch is used automatically when needed. |
17:28:00 | * | gokr_ joined #nim |
17:30:23 | Arrrrr | Continue please, this is too quiet. |
17:30:24 | * | kumool joined #nim |
17:30:25 | * | gokr quit (Ping timeout: 264 seconds) |
17:31:45 | Araq | hi Arrrrr |
17:32:31 | * | kumul quit (Ping timeout: 244 seconds) |
17:33:05 | Arrrrr | h-hi |
17:33:07 | * | Senketsu quit (Quit: Leaving) |
17:34:54 | * | Senketsu joined #nim |
17:38:03 | * | gokr joined #nim |
17:38:34 | * | gokr_ quit (Ping timeout: 245 seconds) |
17:39:00 | fowl | BlaXpirit: single dispatch, boring |
17:39:07 | BlaXpirit | ? |
17:39:29 | BlaXpirit | oh ok |
17:39:35 | fowl | Single dispatch is boring |
17:39:42 | * | johnsoft quit (Ping timeout: 264 seconds) |
17:40:03 | BlaXpirit | i'm not sure if you're correct, but this has never mattered to me anyway |
17:43:00 | coffeepot | ello, I'm not running devel, just on 0.11.2, but trying to construct a ridiculously large 3 dimensional array gives a C error(?) rather than a nim one: https://gist.github.com/anonymous/8aefb1cd9e268a511f57 |
17:43:21 | coffeepot | report? |
17:43:35 | vikaton | BlaXpirit: So you really like Crystal's philosophy about never having to specify a type? |
17:44:17 | BlaXpirit | that's a side effect, really. not primary importance. besides, you don't have to not specify types. |
17:44:34 | vikaton | dom96, what was that block of text? |
17:44:58 | dom96 | vikaton: https://gist.github.com/dom96/9361d15581ba08aec421 |
17:46:44 | * | zaquest quit (Read error: Connection reset by peer) |
17:48:18 | vikaton | wtf :/ |
17:48:32 | ozra | stupid quest, please enlighten me: What's the easiest way to print out the type of a var with echo? |
17:49:03 | BlaXpirit | ozra, something in typetraits module |
17:49:11 | BlaXpirit | var.type.name if i remember |
17:49:32 | ozra | ah, I was on the right track. typetraits? |
17:49:39 | Arrrrr | That post is a lot of nonsense "i program javascript, therefore rust is obscure" |
17:50:14 | ozra | works then |
17:50:18 | ozra | tahnks |
17:51:37 | * | rgv151 quit (Remote host closed the connection) |
17:56:20 | ozra | Crystal? Comptetition is good. I'm gonna check it out after my bug-fix is done. |
17:57:38 | ozra | vikaton: BlaXpirit: I like to not have to type types _almost_ all the time (obvious situations). As soon as there's a measure of complexity or unclarity, then I want to annotate types. It's to bad infered params are depr. in nim. |
17:58:03 | vikaton | I like both Crystal and Nim |
17:58:24 | vikaton | though Nim does have features I like that Crystal lacks |
18:00:29 | * | zaquest joined #nim |
18:01:58 | ozra | Regarding Crystal: curiosity took over, had to look. Too rubyish; "end", blargh.. - Does it compile via LLVM or C? |
18:02:43 | ozra | (I assume not machine code ;-) |
18:04:57 | * | vendethiel quit (Ping timeout: 240 seconds) |
18:04:58 | vikaton | ozra, LLVM |
18:05:46 | ozra | vikaton: That is one of the other things that attract me to Nim. I consider C the superior "assembler" of today. Much more options of machine-code generators. |
18:08:35 | fowl | ozra: inferred params aren't deprecated, they never existed |
18:08:59 | fowl | Leaving the type off a param meant that it was `any` |
18:09:19 | fowl | Ie its generic |
18:09:55 | ozra | fowl: How would you mean it differs from my intention? So I understand. |
18:10:23 | ozra | BTW: If anyone has an edge case for #2523 I'd be happy to know - I'm testing my bugfix now. |
18:11:48 | * | gokr_ joined #nim |
18:11:50 | fowl | ozra: if we had more inferring we could do arr.map do(f): f+1 |
18:13:04 | fowl | But there's no checking to see if that generic function makes sense there |
18:13:12 | ozra | fowl: If that feature wasn't depre, would `arr.map (f) => f+1`? Since generics are auomatically "filled out" inferred, no? |
18:13:22 | vikaton | The thing I like about Crystal's types is that you can do: x = 5; x = "string" |
18:13:24 | ozra | Aha - that is a generic fn, do notation? |
18:14:03 | fowl | ozra: it is generic without types |
18:14:15 | ozra | vikaton: Yikes! Noooo! Even mutating the value of a symbol should be considered twice imo. Let alone type!! |
18:14:24 | * | gokr quit (Ping timeout: 245 seconds) |
18:15:06 | vikaton | Well, it does a good job at being alot like Ruby |
18:15:42 | fowl | ozra: no that wouldn't work without the deprecation, and you can test it because its not removed yet (its only a warning) |
18:15:59 | ozra | fowl: I'm very interested in that aspect, I've been tinkering with `arr.map Λ((x + 2))` - where Λ creates params from body's undeclared symbols according to a scheme (like KDB/Q). But that means implementing type inference in the macro.. Unless you have some other idea.. |
18:16:28 | fowl | vikaton: its far too early to seriously use crystal, expect major api revisions |
18:16:50 | ozra | For now, in my experiments, I just give the params float64 (since that's what my use-cases will be), but that is kinda limiting.. |
18:17:18 | ozra | fowl: ^ |
18:18:24 | vikaton | fowl, Idk about the revisions, it already alot like Ruby |
18:18:31 | vikaton | almost identical |
18:18:52 | fowl | vikaton: its already diverged from ruby quite a bit |
18:19:13 | ozra | endragor: If you're here - since you discovered the vikaton #2523 bug - do you have any more edge cases? I'm testing my fix for it now. |
18:19:34 | vikaton | the what bug o.O |
18:19:36 | ozra | vikaton appeared "magically", sorry. non intedend |
18:19:40 | vikaton | lol |
18:20:14 | fowl | ozra: it would be hard to figure out what type x should be from the limited info (ast) available |
18:20:25 | ozra | Haha. I dunno why, names keep popping up in the box for no reason if I alt+tab to other win... aaaaah tab... |
18:21:11 | vikaton | ozra, tabulators are not allowed ! |
18:21:28 | vikaton | fowl, because it had too, but I have only made a few pet projects in Crystal |
18:21:40 | ozra | fowl: Yes indeed. only literals could act as guides. Anyways, it's a "dangerous" contruct to use, so is mainly intended for functional chains where arithmetic is used.. so.. KISS |
18:21:49 | ozra | vikaton: I meant in the IRC chat, LOL |
18:21:56 | vikaton | for it's future, I hope most of the performance critical apps wirtten in Ruby is translated to Crystal |
18:22:05 | vikaton | ozra, ik, that was the joke haha |
18:22:22 | ozra | vikaton: sorry, missed that totally. to many balls in the air now, haha |
18:23:43 | fowl | vikaton: yeah it has to diverge from ruby, it will be similar only in the syntax in the end, try to redefine a method and you'll see what I mean. Monkeypatching? Lol. |
18:24:34 | * | vendethiel joined #nim |
18:25:24 | Arrrrr | Why table is an object, but array, set and seq dont? |
18:26:08 | BlaXpirit | these are built-in? |
18:26:14 | fowl | ozra: if a macro accepts typed nodes you can pull the type info from it :) |
18:26:18 | BlaXpirit | but not sure what u mean |
18:27:08 | fowl | Arrrrr: array is a value type, seq and string are refs so they can be nil, they have value semantics though (copy on assign) |
18:28:51 | fowl | bbiab |
18:30:12 | fowl | ozra, cool stuff can be done when you have type info: https://gist.github.com/fowlmouth/3c74409c30533bb0a5b4 |
18:30:14 | Arrrrr | but objects can be value and ref too |
18:30:32 | Arrrrr | if i'm not mistaken |
18:30:42 | fowl | "object" as in the vague term of "something that exists in the program" sure |
18:30:54 | fowl | type x = object # this is a value type |
18:32:00 | vikaton | w0w |
18:32:10 | Arrrrr | Hmm, what if, for some reason, i want to create a proc that accepts arrays and seqs and other objects, for example |
18:32:32 | fowl | Arrrrr, then nim is the language for you! |
18:32:39 | fowl | lol. bbiab |
18:33:01 | * | saml_ joined #nim |
18:33:02 | Araq | "be back in a bwhile"? |
18:33:34 | ozra | fowl: was out smoking. gonna have a look :) |
18:34:12 | coffeepot | fowl: the stuff in that link you posted is really, really cool |
18:34:19 | coffeepot | is that going in the stdlib? |
18:35:04 | Araq | coffeepot: eventually yes. |
18:35:11 | coffeepot | :) |
18:35:50 | ozra | fowl: Here's a justification btw: http://www.quora.com/Whatre-the-coolest-and-or-funniest-programming-errors/answer/Caroline-Zelonka |
18:36:06 | Araq | I knew getType() would be "tha shit man", but fowl still surpassed my expectations :D |
18:37:07 | * | sepisoad joined #nim |
18:37:25 | vikaton | BlaXpirit: what do you mean crystal's std lib is written with though and elegance? o.0 |
18:38:01 | vikaton | /I just had a crazy thought that FaceBook backed Nim ... |
18:38:42 | ozra | fowl: way to much code the glance through for me now, I'll keep the tab open.. |
18:38:42 | * | Jehan` joined #nim |
18:38:47 | iznogoodd | imo crystal is the oposite of what you want in a programming language imo |
18:39:44 | iznogoodd | may as well call types 'strings' and be done with it lol |
18:39:45 | vikaton | <imo> </imo> lol |
18:39:49 | Jehan` | Umm … what people want/need in a programming language depends on a lot of things. There's no universal answer. |
18:40:08 | * | gokr_ quit (Remote host closed the connection) |
18:40:14 | * | gokr joined #nim |
18:40:17 | ozra | Nim is the first language that has drawn me out from C++, while I still consider myself considering it, my heart has made up its mind. Rust, D (the last contender standing against it), an others fell to their knees heiling to Nim(rod) |
18:40:18 | vikaton | hey Jehan` |
18:40:21 | coffeepot | ozra: super call for inheritance, and if i'm reading correctly == operator that automatically walks object fields at compile time for object-object comparisons |
18:40:32 | iznogoodd | Jehan: sure, you might say that, but its not actually true. |
18:40:38 | coffeepot | and interfaces woo :D |
18:40:44 | iznogoodd | there some things that you might think you need, but you dont |
18:41:10 | vikaton | btw, whats the point of discard? |
18:41:17 | Arrrrr | I want interfaces |
18:41:22 | Jehan` | iznogoodd: There is no single language I know of that does all I need. |
18:41:39 | Jehan` | vikaton: To be explicit about throwing away the result of a function. |
18:41:41 | iznogoodd | yes, but something what you think you need, isnt what you need =) |
18:41:51 | iznogoodd | sometimes* |
18:41:53 | * | sepisoad quit (Remote host closed the connection) |
18:42:15 | iznogoodd | like if you think you need cancer cause you want some holidays... i dont think you got it right. |
18:42:20 | Araq | Jehan`: really? i thought C#/Scala are only ruled out because of their runtimes |
18:42:21 | boop | hmm |
18:42:22 | vikaton | Jehan`: Is that for performance reasons? |
18:42:28 | Jehan` | iznogoodd: I have pretty extensive experience with a LOT of programming language and I like to think that I have a pretty good idea what I need. |
18:42:29 | boop | what does it mean if i segfault after calling repr() on a TChannel? |
18:42:34 | ozra | coffeepot: neat |
18:42:43 | Jehan` | Araq: Really what? |
18:42:47 | Araq | boop: don't repr a channel |
18:42:51 | boop | ok! |
18:42:56 | boop | it's not me breaking something is it? |
18:43:09 | Araq | Jehan`: yeah, what do you miss in Scala, for instance? |
18:43:12 | boop | my channel has stopped working across these threads |
18:43:42 | Jehan` | Araq: for starters, that I'm not able to ditch the JVM ties. :) |
18:43:56 | Arrrrr | https://www.youtube.com/watch?v=TS1lpKBMkgg |
18:43:59 | ozra | Arrrrr: interfaces and structural comparison is nice in many cases, unfortunately (depending on implementation) most of my code will probably have to rely on nominals for performance reasons. |
18:44:24 | Jehan` | The JVM FFI is a big problem, for example. The best you can do is JNA, and that's still clunky. |
18:44:25 | Araq | Jehan`: that's an implementation aspect though. |
18:44:49 | Jehan` | Araq: Implementation aspects are important. |
18:45:18 | Jehan` | If sometimes takes 10x as much effort as the same thing in another language, you may as well use the other language. |
18:46:07 | Jehan` | That said, Scala has issues with its type system, namely trying to incorporate Java's too well. |
18:46:35 | ozra | Anyone here a git master guru, and can save me five hours of googling? |
18:46:37 | iznogoodd | what im saying about crystal is, most of the times you want to start with types, then implement whatever you want to do with them. crystal is exactly the opposite. |
18:46:42 | Jehan` | What I'm missing in particular is first-class structural subtyping (here, again, Scala has it in theory, but depends on reflection-based hacks). |
18:47:30 | Jehan` | And then, Scala is statically typed by design, and sometimes, I want/need dynamic typing. |
18:48:30 | Araq | what about c# and its 'dynamic' keyword then? |
18:48:49 | Jehan` | Scala has an equivalent, but it's not the answer. |
18:49:32 | Jehan` | A language that is designed around the assumption of having dynamic typing is not one that also has a dynamic type. |
18:49:38 | ozra | iznogoodd: For my taste it's all the simple procs, also often when prototyping, where it is more than convenient to not have to type explicitly. Cases where it is so obvious what the types are (and likely should be to the compiler too) - in those cases types are just noise. |
18:50:07 | Jehan` | Dynamic typing, for example, tends to go hand in hand with flexible metaprogramming facilities. |
18:50:10 | * | gokr quit (Remote host closed the connection) |
18:50:33 | Jehan` | Where there's no real distinction between runtime and compiletime. |
18:51:05 | ozra | Jehan`: ? There's always a distinction.. unless JIting |
18:51:11 | Jehan` | Obviously, having such features comes at a price (for example, too many languages implement them by providing slow interpreters). |
18:51:51 | iznogoodd | it mostly comes at runtime crash cost |
18:52:06 | iznogoodd | or as true == false |
18:52:12 | * | gokr joined #nim |
18:52:27 | iznogoodd | and you got no garantee on anything |
18:53:12 | Jehan` | object MiniTruth extends App { |
18:53:12 | Jehan` | class State { override def equals(other: Any) = true } |
18:53:12 | Jehan` | object War extends State |
18:53:12 | Jehan` | object Peace extends State |
18:53:12 | Jehan` | println(War == Peace) |
18:53:12 | Jehan` | } |
18:53:14 | boop | hmm |
18:53:14 | iznogoodd | you can just use eval all day in php to do whatever you want, i wouldnt call that a good feature |
18:53:34 | Jehan` | That's statically typed (and not a criticism, I *like* Scala). |
18:53:35 | boop | can i not pass a channel to another thread and then communicate using it? |
18:53:42 | boop | (passing with createThread args) |
18:54:24 | Araq | boop: no you cannot. |
18:54:49 | boop | ahh. needs to be a global var? |
18:54:51 | boop | hmm |
18:54:54 | Araq | you can pass a 'ptr TChannel' though |
18:55:13 | iznogoodd | thats what im saying, you can recreate 'dynamic' typing in static typing, you cann do the inverse |
18:55:19 | iznogoodd | cannot* |
18:55:50 | Jehan` | iznogoodd: My point is that the benefits of static typing are rather limited. They cannot properly capture the semantics of a program. |
18:56:07 | iznogoodd | ... |
18:56:23 | Jehan` | I happen to like static typing most of the time, but I also know the studies that tell me that static typing does not necessarily make programs more likely to be correct. |
18:57:21 | iznogoodd | i know that if i change the name of a record field, i will know right know where i will need to change the names |
18:57:34 | iznogoodd | in a true dynamic language, i might not know it for a good year |
18:57:36 | Jehan` | iznogoodd: And does this actually translate into fewer software defects? |
18:57:43 | iznogoodd | ... |
18:57:56 | iznogoodd | yes it does |
18:58:00 | Araq | yeah but these studies need to be re-evaluated once static typing starts to prevent concurrency/parallelism bugs on a large scale |
18:58:29 | iznogoodd | maintainance programming is 99% of the job |
18:58:37 | Araq | (if they ever will be able to do that) |
18:58:54 | iznogoodd | thats where static typing helps |
18:58:56 | Jehan` | iznogoodd: https://courses.cs.washington.edu/courses/cse590n/10au/hanenberg-oopsla2010.pdf |
18:59:18 | iznogoodd | i dont need to read any studies |
18:59:23 | Jehan` | iznogoodd: Okay. :) |
18:59:25 | iznogoodd | i experience it first hand |
19:00:31 | Jehan` | That's your prerogative, but it isn't scientific. |
19:00:49 | iznogoodd | try to change something into a 10million line of code php program with 0 unit test, and tell me when you know it cant crash at runtime |
19:00:56 | iznogoodd | do the same in a statictly type language |
19:01:04 | iznogoodd | no study needed |
19:01:14 | flaviu | Jehan`: There is absolutely no way that it doesn't translate into fewer software defects. |
19:01:34 | flaviu | If I rename a variable and the compiler errors out, that's an defect prevented. |
19:01:38 | Jehan` | PHP has design defects that extend beyond typing concerns. |
19:01:50 | Jehan` | flaviu: If you have infinite development time, yes. |
19:02:01 | flaviu | If I rename a variable and forget to grep for it and rename it, that's a defect created |
19:02:01 | iznogoodd | replace PHP with RUBY or PYTHON |
19:02:03 | iznogoodd | or anything |
19:02:11 | iznogoodd | what would you grep? |
19:02:14 | Jehan` | But the primary benefit of types from all I know is that they work as verified documentation. |
19:02:22 | iznogoodd | you cannot grop a field name |
19:02:42 | flaviu | iznogoodd: sure you can. |
19:02:47 | iznogoodd | how would you know its is the right field? |
19:02:53 | iznogoodd | a field can be in any number of type |
19:03:18 | iznogoodd | and you just want to rename a single type |
19:03:33 | iznogoodd | you cant unless you run every pathway |
19:03:33 | flaviu | iznogoodd: A lot of hungarian notation would work ;) |
19:03:43 | Jehan` | flaviu: And what makes you think that this defect would make it through testing? |
19:03:44 | flaviu | But my experience has been mostly with small projects. |
19:03:57 | iznogoodd | Jehan im telling you |
19:04:00 | Jehan` | Remember that even with statically typed languages, you still have to test. |
19:04:05 | iznogoodd | no |
19:04:09 | iznogoodd | you wouldnt have to |
19:04:15 | iznogoodd | its just a field rename |
19:04:23 | * | sepisoad joined #nim |
19:04:26 | iznogoodd | aka, makes no difference once compiled |
19:04:32 | flaviu | Jehan`: There are no tests for this certain obscure functionality that happens to have a reference to renamed field. |
19:04:35 | gokr | in a large codebase static typing narrows down senders and implementors. However, its a game of plus and minus. |
19:04:41 | Jehan` | iznogoodd: You can deduce that a program is semantically correct just from the typing? |
19:04:54 | iznogoodd | its implementation defined |
19:04:58 | iznogoodd | its running correctly |
19:05:01 | iznogoodd | i just want to change a field name |
19:05:03 | profan | if it's just a field rename, you should be using something which can parse your language then to rename things, not grep :I |
19:05:13 | profan | that's not a good idea even if its statically typed |
19:05:15 | iznogoodd | in php or pythong or ruby i cant |
19:05:17 | iznogoodd | ever |
19:05:22 | iznogoodd | change that field name |
19:05:34 | Araq | profan: renaming "properly" with dynamic typing is undecidable |
19:05:35 | Jehan` | iznogoodd: so, you have a statically typed object with float fields x and y. |
19:05:42 | Jehan` | And change a use of .x to .y. |
19:05:53 | Jehan` | It's correctly typed, and it's wrong. |
19:05:54 | Araq | profan: it's not grep vs IDE. even the IDE cannot do it accurately. |
19:06:04 | iznogoodd | lol jehan |
19:06:10 | iznogoodd | you are funny |
19:06:20 | iznogoodd | comic award 1990 |
19:06:21 | * | gokr quit (Read error: Connection reset by peer) |
19:06:23 | flaviu | Jehan`: My point is that static typing prevents an entire class of errors. |
19:06:30 | flaviu | Not that it prevents every error. |
19:06:42 | profan | Araq: well, fair enough that in a lot of cases, it wont help :P |
19:06:45 | Jehan` | flaviu: And my point is that this prevention does not necessarily show up in practice. |
19:07:00 | Jehan` | That's why I cited a damn paper. |
19:07:06 | Arrrrr | lol |
19:07:11 | iznogoodd | i maintain multiple multi million line projects of dynamic languages. and i will not try to ever rename anything or change anything that is working |
19:07:25 | profan | theres' many papers which support both sides, something simply haviang a paper supporting it doesnt necessarily make it an undeniable truth |
19:07:34 | iznogoodd | legacy system maintenance isnt something you want to deal with in dynamic languages |
19:07:47 | Araq | Jehan`: that paper is about Groovy vs Java though afaict. so ... :P |
19:07:50 | iznogoodd | jehan, it does everyday in practice |
19:08:10 | Jehan` | I'm not saying that dynamic typing is better. My point is that the arguments that most people make in favor of static typing tend to not be supported by actual research, just personal belief. |
19:08:28 | Jehan` | Araq: No, that's a different paper. |
19:08:28 | profan | that usually applies to everything in this realm to be fair |
19:08:40 | Jehan` | profan: Yeah, that's a major problem IMO. |
19:08:44 | vikaton | is Discard for performance reasons? |
19:08:47 | * | Mat4 joined #nim |
19:08:50 | profan | people have a hard time separating their emotional attachment to what they enjoy working with, and well, everything else |
19:08:53 | Jehan` | vikaton: No, for correctness. |
19:09:09 | vikaton | correctness in? |
19:09:12 | Araq | but before this gets into a flamewar, let me add my 2 cents: |
19:09:13 | flaviu | Jehan`: That paper does not discuss renaming things. |
19:09:13 | profan | even I have the same problem sometimes, so I can't blame them, but it's a sad state of affairs :P |
19:09:36 | Jehan` | flaviu: No, it doesn't. It evalutates development in a statically vs. dynamically typed language as a whole. |
19:09:47 | Jehan` | Mind you, the experiment is limited etc. etc. |
19:10:34 | ozra | Jehan`: If static type checking didn't help there wouldn't be there myriads of such produced for the javascript language. It doesn't guarantee that a program is correct. But it's likely _more_ correct than its dynamic counter part. |
19:10:55 | iznogoodd | static analysis + types are always good |
19:11:26 | flaviu | The only conclusion I can come from based on that paper is that dynamic typing is superior to static typing for prototypes. |
19:11:40 | Araq | actually I really want static typing for *scripting*, because scripting is when you don't have a test suite and usually it's even about effecting your hard disk's contents |
19:11:41 | Jehan` | ozra: That's what you'd intuitively think, but it's not actually supported by the evidence. |
19:12:27 | iznogoodd | aka that guy who implements something in a month, then im stuck maintaining it for 10 years. |
19:12:27 | Jehan` | flaviu: As I said, it's one paper. And there are benefits to static typing for which there is strong evidence, but the same benefits seem to also extend to soft typing. |
19:12:28 | profan | i was just reading a paper about this, lets see if i can dig it up |
19:13:02 | ozra | If you by evidence suggest that one study (has it been extensively peer reviewed?) questioning the 'productivity pro' of static langs.. well. I've coded both for a looong time, and my experience at least tells me to use static typing. |
19:13:06 | flaviu | A more useful followup to that study would be to have people make changes on a medium-sized project and see who creates the most defects. |
19:13:26 | ozra | Sorry. You did mention that it's one paper above. moot criticism by me. |
19:13:35 | ozra | Jehan`: ^ |
19:14:07 | * | gokr joined #nim |
19:14:21 | Jehan` | ozra: here's the thing. I'm far more interested in contracts, static analysis, and other ways to verify semantic properties. |
19:14:38 | Jehan` | Types, to be blunt, are pretty weak shit when it comes to verifiability. |
19:15:14 | iznogoodd | Jehan`: my point is, with a dynamic language, you wont be able to find where a type is used, so modifying something is close to impossible. |
19:15:32 | ozra | Java ought to be the first language on earth (my opinion entirely, and I could base a religion upon it) |
19:15:34 | iznogoodd | at least with a static typing, you can at least try to modify it |
19:15:43 | Jehan` | iznogoodd: And my point is that I'm thinking about the languages of tomorrow, not the languages of yesterday. |
19:15:44 | iznogoodd | thats all im saying |
19:16:16 | iznogoodd | It wont be what they call 'dynamic typing' |
19:16:23 | iznogoodd | as in javascript php pythong etc |
19:16:27 | iznogoodd | it will be statically typed |
19:16:32 | iznogoodd | with dependant types |
19:16:37 | iznogoodd | most likely |
19:17:32 | Araq | iznogoodd: I'm not sure about that. it really is less effort to test quicksort extensively than to prove it correct. |
19:18:22 | iznogoodd | Araq: sure you can mix both, but for a lot of stuff dependant types are pretty ez to use |
19:18:24 | ozra | Jehan`: Well, types has served me well, so do believe in them because of personal "empirical evidence". That doesn't exclude other static analyses. They complement. |
19:18:41 | flaviu | Araq: And then you get bugs like that latest one in Java's Timsort |
19:18:49 | Araq | also we really like our types to take less space than our programs |
19:18:53 | flaviu | http://www.envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ |
19:19:02 | * | gokr quit (Remote host closed the connection) |
19:19:18 | * | gokr joined #nim |
19:21:28 | ozra | Java ought to be the WORST language that was supposed to say, oh the irony, hahaha. |
19:21:30 | Jehan` | ozra: And a mathematician colleague of mine does stuff in category theory for which no current type system (other than anything that does full theorem proving) is expressive enough. So he's sticking with dynamic typing and doing verification through other means. |
19:22:04 | * | rgv151 joined #nim |
19:23:49 | Jehan` | ozra: The type system he's using does predicate dispatch, which is sort of necessary for this kind of computer algebra and which is really hard to do "statically" in any meaningful sense of the word. |
19:23:57 | iznogoodd | what i do know is. in dynamic language 50% of the code is if(is_array(xs) && !empty(xs) && isset(xs["prop"]) && !empty(xs["prop"]) && xs["prop"] > 33) .... |
19:23:59 | Jehan` | As the types change throughout the computation. |
19:24:22 | Jehan` | E.g. once you discover that a group is abelian, its methods change accordingly. |
19:24:26 | profan | iznogoodd: that just seems like a case of bad design :I |
19:24:45 | ozra | Jehan`: I understand there are highly specific theoretical cases. I am of course concerned with systems coding. In the future we might have dependantly typed, purely functional, or purely mind-reading languages that out perform imperatively written ones - but for the forseeable future, the brain seems to outpeform compilers. |
19:24:55 | iznogoodd | profan: thats just a retarded example to prove my point |
19:24:56 | Mat4 | Jehan`: I think ATK can handle that |
19:25:03 | iznogoodd | but you really have no garantee of anything |
19:25:08 | profan | iznogoodd: retarded examples don't prove points, they're just retaraded :P |
19:25:19 | Jehan` | ozra: Exactly. Opinions tend to be highly colored by the application domains one sees personally. |
19:25:23 | profan | bad code can be written in any paradigm |
19:25:29 | iznogoodd | of course you can make assumptions, but everything can be true at runtime |
19:25:32 | Araq | flaviu: fair enough, but TimSort really is too complex for what it does. :P |
19:26:12 | Jehan` | Mat4: Not familiar with ATK, at least not as this acronym? |
19:26:17 | Araq | tried to port it before I simply used mergeSort in the stdlib |
19:27:05 | * | kumool quit (Ping timeout: 272 seconds) |
19:27:05 | ozra | Jehan`: like you stated earlier, there is no one ring to rule them all, it's that simple. I can't wait till we reach a state in compiler tech, that can within reasonable time, create the most efficient implementations of a problem description. But, then again, as said. |
19:27:10 | iznogoodd | Idris is where its at |
19:27:16 | * | profan wishes more languages would follow the Erlang approach to failures |
19:27:36 | profan | so much useless defensive code could be gone :P |
19:27:45 | * | rgv151 quit (Ping timeout: 265 seconds) |
19:28:14 | profan | not appropriate in every domain of course |
19:28:16 | Jehan` | profan: A philosophy shared by Eiffel. :) |
19:28:35 | Jehan` | Though for different reasons. |
19:29:07 | Jehan` | That said, some day I'd really like to explore the possibilities of micro-reboots to handle failure. |
19:29:13 | Jehan` | Which is a variation on that theme. |
19:29:14 | profan | Jehan`: must admit i haven't looked much at Eiffel, past what i've read about some spotty parts in it's type system :P |
19:29:31 | ozra | I've attended a couple of Erlang and Haskell meet ups with some of the originators of Erlang, and it was very interesting indeed. Lots of inspiration to get from other paradigms even when you're by practicality locked down to imperative langs. |
19:30:51 | profan | ozra: interesting anecdote, one of the creators (joe armstrong) is horrid at typing :D |
19:30:53 | Araq | flaviu: also the bug occurs for arrays of length 2^49. nobody cares about that. |
19:30:56 | Jehan` | profan: Eiffel's type system is pragmatic. Since it mixes runtime checking in, anyway (contracts), the philosophy is that there's a useful tradeoff in keeping the type system simple and having covariance issues checked at runtime. |
19:31:26 | flaviu | Araq: Computers are only getting faster and bigger. |
19:31:40 | Araq | Jehan`: but it didn't check them at runtime for years iirc. |
19:31:55 | Jehan` | That means it can't express everything that Scala does with variance annotations, but also that its type system is an order of magnitude simpler than Scala's. |
19:32:24 | iznogoodd | flaviu: computers arent getting bigger: http://www.eecs.umich.edu/eecs/about/articles/2015/Worlds-Smallest-Computer-Michigan-Micro-Mote.html |
19:32:32 | Araq | flaviu: maybe people continue to use databases though. |
19:32:36 | Jehan` | Araq: Are you sure? Mind you, it's been decades, but that's not what I recall. |
19:32:39 | profan | Jehan`: might have to look at eiffel at some point then, if not only for the fact that contracts are wonderful :P |
19:32:50 | flaviu | iznogoodd: Memory-wise |
19:33:00 | Jehan` | profan: It's a bit dated these days, but it did have interesting ideas. |
19:33:01 | * | egrep is now known as egrepnix |
19:33:02 | Araq | Jehan`: nope, not sure. also there are multiple implemenations of Eiffel anyway. |
19:33:07 | * | sepisoad quit (Ping timeout: 264 seconds) |
19:33:07 | * | egrepnix is now known as egrep |
19:33:24 | profan | Jehan`: well, purely as an academic exercise, won't be building things in Eiffel :) |
19:34:32 | Jehan` | profan: The biggest problem with Eiffel was its verbosity. |
19:34:58 | Jehan` | Well, to an extent there was a point to the verbosity (some things don't come for free), but also some stuff that was unnecessarily verbose. |
19:35:51 | Araq | no, the biggest problem was that it uses inheritance for 'import'. |
19:35:58 | Jehan` | In any event, Meyer argued strongly against defensive programming, because that was at odds with DbC in his opinion. |
19:36:56 | Jehan` | Araq: Well, technically, once functions were the equivalent of import. :) |
19:36:56 | * | milosn quit (Ping timeout: 265 seconds) |
19:37:46 | Jehan` | Interestingly, there was a proposal once to have an "inherit expanded" that would have been import-like functionality, but that was abandoned. |
19:39:55 | Mat4 | Jehan`: sorry, I mean ATS |
19:40:07 | Araq | at one point I considered using Eiffel instead of Delphi cause it has a GC. |
19:40:10 | Jehan` | Mat4: Oh, gotcha. |
19:40:37 | Jehan` | Araq: The thing about EIffel is that it's very opinionated as to how stuff is to be done. |
19:40:41 | Araq | but then I simply used 'new' and never 'dispose' and called it day. |
19:40:48 | Araq | ;-) |
19:41:03 | Jehan` | That can be an issue if you don't subscribe to the same philosophy. |
19:41:09 | * | Araq knew this program would be translated into a GC'ed language anyway (Nim) |
19:41:30 | Jehan` | Araq: Heh. Or you could have used the Boehm GC as a temporary solution. |
19:42:14 | * | fizzbooze joined #nim |
19:42:46 | Arrrrr | So you created nim in order to avoid eiffel |
19:42:48 | Jehan` | I used Eiffel as the basis for my Ph.D. thesis because at its core it was a very simple language and I could hack together a basic Eiffel->C compiler in a couple of months. |
19:43:20 | * | milosn joined #nim |
19:44:49 | Araq | Jehan`: yeah I used it until it started to crash my programs |
19:44:56 | * | BitPuffin|osx joined #nim |
19:45:12 | Jehan` | Araq: Heh. Which implementation? |
19:45:44 | Araq | dunno. some DLL and Delphi unit from the net. |
19:46:49 | iznogoodd | delphi was a really nice language... in 2002 |
19:47:05 | iznogoodd | hasnt aged well :( |
19:47:30 | Araq | nah the verbose syntax always has been a PITA |
19:47:46 | Araq | begin begin begin end end end |
19:48:04 | iznogoodd | that too, but for RAD in 2002 imo, there was nothing better for productivity |
19:48:06 | iznogoodd | imo |
19:48:29 | Araq | I get the idea of "training wheels", but that's not a wheel, that's a block of concrete |
19:48:39 | iznogoodd | lol |
19:49:12 | Araq | but the *environment* really kicked ass |
19:49:19 | Jehan` | I still like the Pascal's family of languages basic syntax, just minus the "begin". |
19:49:45 | Jehan` | And minus the enforced capitalization in Modula-2 etc. |
19:50:02 | Araq | lol yeah |
19:50:06 | Mat4 | it's for sure readable |
19:50:20 | Jehan` | When the entire program is shouting at you and little finger gets worn out from holding down the shift key. |
19:51:01 | Araq | no and that's my biggest gripe: IME it's not readable. it's only verbose. |
19:51:45 | Jehan` | What specifically? The Modula-2 syntax, the Pascal syntax, or something else? |
19:51:54 | Araq | the pascal syntax. |
19:51:57 | iznogoodd | Turbo Pascal was my first real language after ASM |
19:51:58 | Mat4 | hmm, I compare to C in case of readability |
19:52:07 | iznogoodd | i dont count Qbasic as a real language lol |
19:52:26 | Mat4 | why not ? |
19:52:56 | Jehan` | My problem with Pascal's syntax is more that it has all the issues that braces have without their benefits. |
19:53:13 | Mat4 | what are benefits of braces ? |
19:53:28 | iznogoodd | 1 button? |
19:53:37 | Jehan` | Mat4: It's pretty easy to jump to the matching brace in just about any editor. :) |
19:53:39 | ozra | profan: Was away at food. Haha, alright. |
19:54:21 | Jehan` | That said, I'm not so fond of braces myself. |
19:54:33 | * | vendethiel quit (Ping timeout: 240 seconds) |
19:55:01 | profan | ozra: he'd type at a horrid pace and have typos everywhere, but expect programming beginners to jump in and implement git in erlang, wonderful guy though, doesn't realise how much he knows :P |
19:55:13 | Jehan` | My favorite syntax is the `if … then … else … end` syntax of Eiffel or Ruby, then the Pythonesque indentation-based approach. |
19:55:23 | ozra | flaviu: regarding faster and better. (respponse out of context) Computers are also getting replaced by battery powered handheld devices more and more.. |
19:55:36 | * | vendethiel joined #nim |
19:55:39 | flaviu | ozra: Of course, but Ara |
19:55:55 | flaviu | q's point was that no one would have 2**44 element arrays |
19:56:08 | flaviu | err, 2**49 |
19:56:42 | Araq | not really "no one" but it surely makes it a "minor" bug. |
19:56:47 | Mat4 | Jehan`: ok, thats probably a taste of programming style |
19:56:57 | Jehan` | Mat4: Definitely a matter of taste. |
19:57:26 | Jehan` | And someone once made an argument that one of the benefits of braces is that you can figure out grouping easily without syntax highlighting. |
19:57:59 | Jehan` | That was a general point about symbols vs. keywords. |
19:58:17 | ozra | iznogoodd: I coded a lot of Delphi around then for a customer, can't say I enjoyed it much though :-/ |
19:58:29 | Jehan` | I don't disagree, but in 2015, syntax highlighting is ubiquitous. |
19:58:40 | Jehan` | (That was back in the 1990s.) |
19:59:12 | iznogoodd | ozara: where i live, during those years every company around here was using it |
19:59:14 | ozra | flaviu: aha, I just jumped in can caught up and commented out of my ass ;-) |
19:59:17 | iznogoodd | many still do |
19:59:37 | ozra | profan: handicapped hands? He needs robot-devil-hands. |
19:59:43 | Jehan` | Mat4: The one issue that I have with indentation-based syntax is that generating code can be annoying. But, well, nothing's perfect. :) |
20:00:14 | iznogoodd | ozra: as/400 + delphi, thats all there was around here lol |
20:00:41 | ozra | iznogoodd: a bauta rock! |
20:01:04 | profan | ozra: haha, indeed, don't think he has problems with his hands though, just bad at typing |
20:01:21 | flaviu | Jehan`: Macros? |
20:02:00 | Jehan` | flaviu: Macros aren't really all that great for some applications. |
20:02:39 | Mat4 | Jehan`: to came back to the discussion against symbols: That is culture dependent. People for example which are comfortable reading the traditional chinese scrift tend to have no problem with languages like APL |
20:02:41 | ozra | iznogoodd: It was all C++ for the rest at that point for me... I looong resisted C++ and stuck with C, until about 99.. |
20:02:53 | Jehan` | Think precomputing tables for certain algebraic types that aren't cheap to precompute. |
20:02:54 | Mat4 | ^script |
20:03:11 | ozra | Mat4: haha |
20:03:29 | flaviu | Jehan`: I see, makes sense. |
20:03:33 | Jehan` | Mat4: Oh, definitely. |
20:04:57 | Mat4 | that's also in my opinion one main reason why so much people found the mathematic notation difficult to understand |
20:05:06 | fowl | I'm using gettype to generate a deep decref function |
20:07:35 | fowl | Needs to look inside objects/tuples and decref things inside it |
20:16:17 | * | Arrrrr quit (Quit: WeeChat 1.2) |
20:17:04 | Araq | fowl: lib/system/sysstr uses something like that already in the implementation of 'setLen' |
20:17:25 | Araq | you should expose that instead |
20:17:28 | Araq | and use it |
20:21:29 | * | gokr quit (Quit: IRC for Sailfish 0.9) |
20:24:04 | * | rgv151 joined #nim |
20:28:31 | * | rgv151 quit (Ping timeout: 256 seconds) |
20:31:22 | ozra | Araq: Give me some git advice if you will: the #2833 feature, I PRed from my devel branch instead of feature, now I've fixed #2523, just gonna do some extra checks. That's in a feature-branch, but based off of the dev-branch, which already has the other in it. Do you have a hot tip of how I get out of this mess without wrecking history? |
20:33:24 | ozra | Perhaps just take it as a lesson, start over from Araq/Nim and make merges manually locally - don't know what happend to #2833 then? Close and make new PR from feature branch? |
20:33:36 | ozra | *happens* |
20:33:53 | * | Quora is now known as Heartmender |
20:34:05 | Araq | don't ask me for "git advice". I only use it because I have to. |
20:34:27 | ozra | Araq: Cool, just wanted to check if you knew off the bat. |
20:34:43 | BlaXpirit | ask flaviu, he's a magician |
20:34:55 | ozra | BlaXpirit: thanks. |
20:36:24 | ozra | flaviu: I was tipped you're git-guru ;) I repose my dilemma, if you have any git advice: the #2833 feature, I PRed from my devel branch instead of feature, now I've fixed #2523. That's in a feature-branch, but based off of the dev-branch, which already has the other in it. Do you have a hot tip of how I get out of this mess without wrecking history? |
20:36:57 | flaviu | git rebase --interactive HEAD~1 |
20:37:03 | flaviu | maybe HEAD~2 |
20:37:26 | flaviu | and delete the commit you don't want, literally delete the line with that commit on it. |
20:37:54 | flaviu | You want to change the parent of that commit, you're going to have to rewrite some history. |
20:39:01 | ozra | Hmm, ok. I guess maybe the simplest way is to 'start over' from Araq/Nim, merge manually in individual feature branches, take down the open PR, and make a new one. |
20:39:20 | ozra | I think I could do more damange then good if I start playing around with git magic... :-/ |
20:39:52 | reactormonk | Araq, how come nim doesn't start at 1? ^^ |
20:40:20 | ozra | flaviu: thanks for your suggestions. |
20:40:31 | flaviu | ozra: I wouldn't worry about doing damage. |
20:40:35 | flaviu | see git reflog. |
20:41:04 | ozra | Ok, I'll google around on the pointers you gave me, and we'll see how it resolves :) |
20:42:37 | Araq | reactormonk: I dunno. |
20:43:01 | * | vendethiel quit (Ping timeout: 255 seconds) |
20:44:59 | * | rinukkusu quit (Ping timeout: 272 seconds) |
20:46:22 | * | rinukkusu joined #nim |
20:47:34 | jaco60 | (beginner inside) : i'm going crazy... i want to write a proc which return a seq of (int, int) tuples... the body of the proc has to add a tuple to result if some condition is met, something like that (in Python) : http://sprunge.us/hQef |
20:47:58 | jaco60 | bu i'm stuck with adding something to result :( |
20:49:45 | jaco60 | the next step will be to return an iterator... |
20:52:52 | Araq | jaco60: seems easy enough to write that snippet in Nim. |
20:53:53 | jaco60 | yes, but i got errors while adding a couple to result... Seems i miss something woth seq syntax |
20:56:03 | Araq | result.add((a, b)) # adds tuple (a, b) |
20:56:04 | Jehan` | jaco60: result.add((a, b)) should work. |
20:56:24 | jaco60 | well... That's the first thing i've tried :) |
20:56:34 | Jehan` | What's your Nim code? |
20:56:47 | Jehan` | It's difficult to guess without seeing either the code or the precise error you're getting. |
20:57:53 | * | TEttinger joined #nim |
20:58:06 | Jehan` | The following works for me: https://gist.github.com/rbehrends/951217a08cb99a323223 |
20:58:20 | jaco60 | http://sprunge.us/NhKV |
20:58:54 | Jehan` | Ah, the problem is that you define the result type as auto, but there's no way for Nim to guess what the result type might be. |
20:58:59 | * | fizzbooze quit (Ping timeout: 245 seconds) |
20:59:12 | Jehan` | The compiler cannot figure out that you want a seq type of tuples. |
20:59:53 | Jehan` | if you want that, you have to initialize result to something like `newSeq[(int, int)]()`. |
21:00:57 | jaco60 | Ok, thanks... i'm gonna try |
21:01:23 | ozra | flaviu: May I ask what your practise is for making a PR, so I can establish a good practise and not get into another fucking mess.. |
21:04:51 | Jehan` | ozra: What's your precise problem? |
21:06:44 | ozra | Jehan`: I have one PR from my devel branch, and now I fixed a bug which I need to PR, it's on feature branch still, but based of the already modded dev. The first PR is still hanging, so I should PR the other without that mod tangled in. I should ofc. have PRed from the feature branch for the first one.. But well, that's where I am.. |
21:07:32 | ozra | I'll probably just diff it and separate manually from clean slate. But it would be good to have a good practise for the future... |
21:07:43 | Jehan` | ozra: So, you want to separate the two sets of commits? |
21:08:26 | ozra | Yeah. And know if there are any gotchas to think about for future PR's. Just doing it from feature branch is the best way? |
21:09:03 | ozra | I'm ooold in the coding world, and noooob to githubbing. Have used git for a log time, but at a very rudimentary level. |
21:09:09 | Jehan` | I'd personally start a new clean branch from the place where you originally wanted, then use `git cherry-pick` to transfer the commits over there. |
21:09:26 | Jehan` | Then use `git reset --hard` to get rid of them on the other branch once everything works. |
21:09:46 | Jehan` | You can do it with rebase, too, but it's less likely to break stuff this way, since cherry-pick doesn't delete anything. |
21:09:51 | ozra | Sounds good. And the currently open PR will close then? And I make a new from the feature branch? |
21:10:21 | Jehan` | PRs need to be closed on GitHub. |
21:10:36 | Jehan` | Okay, let's walk through this. |
21:11:00 | Jehan` | My understanding is that you have something like Base -> A1 -> A2 -> B1 -> B2 |
21:11:12 | Jehan` | where the Ai belong to one set of changes and the Bi to another. |
21:11:19 | ozra | Ok, I've got a couple of suggestions now, thanks, I'll probably be able to sort it out without to much trouble. |
21:11:27 | Jehan` | Oh, okay. |
21:11:29 | ozra | Yes |
21:12:10 | Jehan` | Then I'd use `git checkout -b some-new-branch Base` to start a new branch. |
21:12:12 | ozra | Yes. Did a feature A. Merged to devel. Merged to github. PRed. Did a feature branch B. |
21:12:28 | Jehan` | Use `git cherry-pick` to move B1 and B2 over to the new branch. |
21:13:03 | Jehan` | then switch back to the old branch and use `git reset --hard A2` to get rid of B1 and B2. |
21:13:31 | ozra | Would it be best if I ditched my ozra/Nim and start over my github fork from Araq/Nim? |
21:13:49 | Jehan` | You can also do that if you don't mind redoing the work. |
21:13:59 | Jehan` | Just make sure to save your existing changes somewhere. |
21:15:03 | ozra | I just thought I move the local repo to 'nim-repo-to-cherry-pick-from', clone new all the way, diff vs the 'dirty' local repo and move over to two separate feature-branches in the clean slate. |
21:15:50 | ozra | And then PR them both from the feat's. Sounds good? |
21:15:58 | * | ARCADIVS joined #nim |
21:17:10 | Jehan` | Do you mean the basic diff tool or git diff? |
21:17:27 | Jehan` | Because git can't really diff against versions in another repository. |
21:17:37 | ozra | Jehan`: Dunno, I use meld for all diffing, from git too.. |
21:17:50 | Jehan` | Oh, meld should work. |
21:18:25 | ozra | Yeah, I think this will be the smoothest path for me. So any suggestions on possible future gotchas? |
21:18:52 | flaviu | Jehan`: Of course it can! |
21:19:06 | flaviu | Add the other repo as a remote. |
21:19:18 | ozra | create feature branch -> do stuff -> push to my hub -> PR. Then? Delete feature branch, and merge my changes from upstream, or merge them from feature branch? |
21:19:39 | ozra | flaviu: right - that's an idea! |
21:20:07 | Jehan` | flaviu: Not directly, you first have to fetch. |
21:20:49 | flaviu | Of course, the remote is just a line in a text file otherwise. |
21:21:08 | Jehan` | flaviu: That's my point. |
21:21:24 | ozra | Which metho after PR described above is the right thing to do (TM)? |
21:21:28 | Jehan` | What I'm saying is that there's no equivalent to, say `bzr diff ../other`. |
21:21:29 | ozra | *method* |
21:22:07 | Jehan` | ozra: Not sure there's a single "right way" to do it. |
21:22:31 | ozra | Ah, no. I mean more like, how do you usually go about it? |
21:22:42 | ozra | merge back from upstream, or locally? |
21:23:30 | Jehan` | ozra: Me? I usually use another VCS with a bridge, but I don't recommend that to other people (because it requires some upfront wiring that may not be for the faint of heart). |
21:24:04 | flaviu | https://gist.github.com/0bfeca0cf9bc5fe53a51 |
21:24:04 | ozra | I figure if devel always comes "from above" it should have the cleanest history. So I basically just do features locally..?? |
21:24:28 | ozra | Thanks flaviu - reads.. |
21:24:38 | Jehan` | ozra: In the end it comes down to familiarity with Git. |
21:25:03 | Jehan` | I.e. understanding the structure of a Git repository and what the basic commands do to it. |
21:25:05 | * | rgv151 joined #nim |
21:25:33 | ozra | Jehan`: Yeah, slowly but surely I expand my git knowledge.. |
21:27:43 | ozra | flaviu: One last q regarding that gist (helpful! thanks!) - when it's accepted. What to do then? Just drop feature branch, and let it pour back from upstream? |
21:28:43 | Jehan` | ozra: No need to drop it. |
21:28:53 | Jehan` | A branch is just a pointer to a commit. |
21:29:06 | flaviu | I delete the branch |
21:29:10 | Jehan` | It will remain as a reference if you need to look it up later. |
21:29:33 | flaviu | but you can do what Jehan` says too. It's personal prefrence. |
21:29:48 | * | rgv151 quit (Ping timeout: 276 seconds) |
21:29:52 | ozra | Hmm, ok, two school here. But the merge to devel, that is done from upstream, instead of local, yeah? |
21:30:11 | ozra | Since it has to merge together with other PR's and changes.. ? |
21:30:33 | flaviu | Its done through the github UI. |
21:30:38 | ozra | (I'm a bit fuzzy i my reasoning now, I'm a bit tired ;) |
21:31:53 | Jehan` | ozra: It will be done upstream, but shouldn't concern you. |
21:32:04 | Jehan` | The merge will become visible in your local repo once you pull. |
21:32:21 | ozra | Thanks. Ok, I think I've got quite a bit clearer picture. A couple of miles on the track and it will be second nature :-) |
21:32:32 | ozra | Thanks alot Jehan` and flaviu ! |
21:35:27 | * | Mat4 quit (Remote host closed the connection) |
21:42:56 | * | BlaXpirit quit (Quit: Quit Konversation) |
21:45:59 | * | intra quit (Ping timeout: 265 seconds) |
21:48:10 | * | jf_ joined #nim |
21:48:34 | * | jf_ quit (Client Quit) |
21:48:50 | * | jf_ joined #nim |
21:48:58 | * | jf_ quit (Client Quit) |
21:49:10 | * | jflim joined #nim |
21:49:33 | jflim | hey guys, has anybody tried to program a network server in Nim? |
21:51:26 | * | vendethiel joined #nim |
21:51:49 | dom96 | jflim: hey, what kind of network server do you have in mind? |
21:52:37 | jflim | an asmtp server, actually. But for now, i'm just looking at the rawsockets module |
21:53:24 | jflim | I see proc bindAddr that has a ptr SockAddr as one of its params. But i dont find any info on SockAddr in the same module or anywhere else |
21:54:11 | * | Jehan` quit (Quit: Leaving) |
21:54:15 | jflim | bit of a background, btw: i'm totally new to Nim, but not to C |
21:54:20 | dom96 | jflim: You shouldn't use that module, check out net, or if you want async then the asyncnet module. |
21:54:41 | dom96 | jflim: rawsockets module is mainly just a low-level wrapper |
21:54:44 | jflim | What if i want to do non-blocking reads? Is there any way to do it? |
21:54:59 | jflim | net doesnt allow me to as far as i can tell. recv blocks |
21:55:11 | jflim | I was thinking of doing select. Hence rawsockets |
21:55:20 | dom96 | That's what asyncnet allows for. |
21:55:33 | dom96 | It's asynchronous so it doesn't block, it uses epoll in the background. |
21:56:13 | jflim | I see. Ok, then that makes sense |
21:56:30 | jflim | What about setting timeouts on a socket or connection? how do i do that? |
21:57:31 | jflim | ie. "wait for a read and timeout within X secs" |
21:59:09 | * | wan joined #nim |
22:01:49 | * | askatasuna joined #nim |
22:02:04 | jflim | my first immediate goal is to be able to write something that can catch clients that speak before their turn |
22:02:12 | fowl | Araq, is setLengthSeq what you're talking about? |
22:02:37 | Araq | fowl: I thhink so |
22:02:41 | jflim | or do u think that doing a sleep, then an immediate recv is ok, instead of doing a read with a timeout? |
22:03:31 | dom96 | jflim: You can use sleepAsync to achieve that. |
22:04:05 | dom96 | jflim: If you haven't seen it yet, Nim has async await similar to C#'s async await. |
22:04:41 | jflim | sorry, not familiar with C#. Where is sleepAsync? cant find it at http://nim-lang.org/docs/asyncnet.html |
22:05:04 | jflim | ok found it |
22:05:06 | jflim | asyncdispatch |
22:06:48 | fowl | Araq, does all this behavior have to use pointers and RTTI? is that to avoid having tons of generics / some incompatibility with generics and compilerProc ? |
22:07:51 | fowl | cannot unsee this x.x |
22:08:53 | Araq | well it's old code :P |
22:09:18 | Araq | but yes, it's to reduce code size |
22:10:58 | fowl | Araq, i want to expose a function to set the finalizer in RTTI, it will be easier than adding a destructor param for unsafeNew >_> |
22:11:42 | Araq | how so? |
22:12:03 | Araq | patching the codegen is pretty trivial to get this feature |
22:13:49 | fowl | one of the `new`s takes an optional int, the other one takes a function pointer, reconciling them would be hideous |
22:14:26 | fowl | i need to be able to pass an int and a function pointer, so which function do i copy code from the other one into? :/ |
22:14:38 | fowl | this is for unsafenew btw |
22:16:00 | Araq | well yes it requires a bit of thinking but it's all there and only needs to be recombined |
22:17:30 | fowl | it seems especially dumb when the function pointer code is ran at module initialization |
22:18:02 | fowl | it could be totally separate, should be, since you can call it with different functions with the effect that the last one codegend is the one thats used |
22:19:31 | fowl | atm i use regular new with a function pointer to create a dummy Object so that other Objects have the right finalizer |
22:21:05 | * | sepisoad joined #nim |
22:21:10 | iznogoodd | ozra: https://help.github.com/articles/support-for-subversion-clients/ |
22:21:12 | iznogoodd | ahahah |
22:21:46 | iznogoodd | if you really want to hate life i guess |
22:22:21 | fowl | i already hate life with git |
22:22:25 | ozra | iznogoodd: hehe, wtf? subversion? |
22:23:29 | iznogoodd | lol git is the best thing ever |
22:24:09 | iznogoodd | you can do whatever you wanna do, compared to svnhell imo |
22:25:01 | * | johnsoft joined #nim |
22:26:09 | * | rgv151 joined #nim |
22:26:14 | iznogoodd | of course you have to understand the underlying principles, but once you.... Its not the most coherent api, since every command is a whole program. |
22:26:51 | ozra | iznogoodd: Yeah, I like git, as much as you can like any necessary evil, just haven't had the need for complexities of any kind before. Better late than never to learn.. |
22:27:29 | fowl | The added complexity is not always needed, I did recently fix my first merge conflict and wrote down the steps for that. Hopefully never again |
22:30:33 | * | rgv151 quit (Ping timeout: 240 seconds) |
22:31:29 | iznogoodd | fowl what were you using before git? svn? |
22:32:01 | iznogoodd | and what are you using as a mergetool? |
22:32:11 | fowl | Yes |
22:32:24 | fowl | Nano |
22:32:42 | iznogoodd | you should setup meld |
22:33:06 | iznogoodd | and do you use git mergetool to resolve the conflicts? |
22:33:40 | ozra | meld rocks |
22:34:03 | iznogoodd | indeed |
22:34:06 | fowl | No I use my git support group (irc) |
22:34:36 | iznogoodd | when there is a merge conflict, you just type: git mergetool |
22:34:42 | iznogoodd | and it will ask you nice questions |
22:35:06 | iznogoodd | and open your merge tool if needed |
22:38:12 | jflim | dom96: thanks for your help |
22:38:38 | dom96 | jflim: np. Ping me any time if you've got more questions. |
22:38:56 | jflim | :) gotcha thanks! |
22:39:22 | TEttinger | http://blog.printf.net/articles/2015/05/29/announcing-gittorrent-a-decentralized-github/ |
22:39:37 | TEttinger | just in case github wasn't complicated enough |
22:39:43 | iznogoodd | fowl: https://git-scm.com/book/en/v2/ |
22:39:50 | iznogoodd | you should at least read the 3 first chapter |
22:40:08 | iznogoodd | coming from svn, you are probably making a lot of false assumption |
22:40:09 | * | jflim quit () |
22:41:57 | Araq | when you have a conflict, you start P4Merge and try to figure out what "mine", "ours", "yours" and "others" means... |
22:42:15 | Araq | it's an amazing program. |
22:42:25 | Araq | you can stare at its buttons for hours. |
22:42:41 | Araq | it will never make sense. |
22:45:40 | iznogoodd | never used p4merge, but using "git mergetool" with meld its really easy. you have a 3 way view with your local copy, the conflicting branch copy and the final result, and you simply mix and match to get the final result you want. |
22:47:46 | * | banisterfiend is now known as Xtopherus` |
22:49:17 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
22:52:15 | iznogoodd | what i really find usefull to not get too much merge conflict on long running branches, is rebasing at least once a day |
22:52:27 | iznogoodd | that way you never have complicated merge to do |
22:54:10 | reactormonk | iznogoodd, I'd prefer opendiff to meld, but that one's mac :-/ |
22:54:51 | iznogoodd | reactormonk: ive looked at many diff tools and havent found anything other than meld that was good that worked on windows + linux |
22:54:57 | iznogoodd | since i work on both |
22:56:35 | iznogoodd | the diffing in meld is pretty spotty, but it does the job of opening 2/3 way diffs and is really lightweight |
23:07:13 | ozra | iznogoodd: yeah I like the easy picking and pointing. I'm a keyboard dude for most everything. This is one of those things that really suits the visual pointy style. I'm done with my conflicts just now. Thank you meld :-) |
23:08:52 | * | Matthias247 joined #nim |
23:09:15 | ozra | TEttinger: gittorrent!! I just ditched dropbox for syncthing, torrent based.. Go de-centralized deluxe! :-) Buuuut... github rocks :) |
23:09:17 | iznogoodd | ozra: yes, diffing / merging is really something that needs a gui imo. Trying to do diff / merge witouth it is just plain maso |
23:09:59 | iznogoodd | i do everything else with command line |
23:10:05 | TEttinger | ozra, yeah it's a neat hack |
23:10:05 | ozra | deffo! |
23:11:22 | iznogoodd | i use a mix of github and bitbucket, that way i can hide my ugly stuff away =) |
23:11:42 | ozra | TEttinger: "Github might get DDOSed by china", haha. Well I had a post on Quora about Tibet that got like 47e+1000 downvotes from chinese. |
23:12:37 | ozra | iznogoodd: why not do the sausage making locally? |
23:13:24 | ozra | aha.. you mean like entire projects? |
23:13:30 | * | jaco60 left #nim ("Leaving") |
23:13:35 | iznogoodd | yes entire project lol |
23:13:36 | TEttinger | github did get DDoSed by china, they actually managed to figure out the code that was redirecting Baidu searches to send requests to Github, and it could only have originated from one of the servers that connects the non-Chinese internet to the great-firewall-encompassed Chinese Internet. |
23:13:55 | iznogoodd | like my git clone in pure bash |
23:13:59 | iznogoodd | i dont want nobody seeing this |
23:14:18 | ozra | omfg wtf? |
23:14:37 | ozra | TEttinger: got damn. |
23:15:02 | ozra | iznogoodd: and... why....? |
23:15:23 | iznogoodd | cause i can :D |
23:16:05 | iznogoodd | i just wanted to understand a bit more how git worked, and i wanted to get a bit more bash experience |
23:16:15 | ozra | or you could have done something useful with your time? - I know. no fun ;-) |
23:16:21 | TEttinger | http://arstechnica.com/security/2015/04/ddos-attacks-that-crippled-github-linked-to-great-firewall-of-china/ |
23:16:28 | ozra | Haha. sounds good |
23:20:19 | iznogoodd | once you understand that every refs is just a text files containing a object hash or another ref, and commits are simply 'zips' with a parent hash. Git becomes way less magic, and you stop being afraid of it. theres even a garbage collector lol |
23:20:28 | * | kumul joined #nim |
23:20:47 | ozra | TEttinger: thanks for the link. interesting. |
23:21:03 | TEttinger | it was rough for about a week |
23:38:32 | * | sepisoad quit (Quit: Leaving) |
23:42:20 | * | Siecje left #nim (#nim) |
23:42:23 | reactormonk | wow, I just realized my first commit to nim was over three years ago |
23:42:58 | reactormonk | pigmej, wanna hack some nim-mode tomorrow? |
23:48:40 | Varriount | Araq: :D |
23:51:59 | * | Matthias247 quit (Read error: Connection reset by peer) |